INTRO

Introducing Resource Tuner
Using Resource Tuner
How To...
Plug-ins
PE File Resource Basics
Order Resource Tuner Now!
Credits
Resource Tuner Online


Overview

Thank you for trying out Resource Tuner™, the fastest, most powerful, and easiest-to-use resource editor for Windows.

TUNE UP THE USER INTERFACE OF YOUR PROGRAM

Longing to have a personal touch on your favorite application? What better way than with Resource Tuner, a power resource editing solution you can use now. Resource Tuner is packed with features which make it an essential tool for anyone tweaking another programs and those wanting a different look and feel.

Resources are data that make up the visual part of your Windows program. With Resource Tuner you can view, edit, modify, delete, translate and repair the resources contained within 32 bit Windows® executable files with the click of a button. This means you can change any program's text, pictures, buttons, colors - you can completely customize any program you own. Each element of the user interface - dialog boxes, menus, icons, pictures, toolbars, string tables and more are right at your fingertips.

Find out how Resource Tuner can help you: Feature Summary.

You can find detailed list of new features at the What's New section of the Resource Tuner help.

Resource Tuner can handle a variety of different PE ("portable executable") file types: EXE, DLL, OCX, MSSTYLES, DRV, SYS, CPL, BPL, DPL, SCR and more. Support is provided for nearly every type of resources imaginable.

WINDOWS XP VISUAL STYLE MANIFEST WIZARD

Using unique XP Visual Style Manifest Wizard, you can now incorporate Windows XP Visual Style into your application. The wizard inserts an application manifest into the resource section of the executable, allowing your legacy application to take advantage of the slick new look for common controls featured in Windows XP.

UPX UNPACKER

Resource Tuner ships with the UPX Unpacker plug-in. This is a start-up processing plug-in that plugs into Resource Tuner for unpacking files compressed with UPX by Markus F.X.J. Oberhumer & Laszlo Molnar (see [image] http://upx.sourceforge.net).

Resource Tuner is a stand-alone version of the resource editor component of PE Explorer™, another Heaventools product. Please visit our home page [image] http://www.heaventools.com for more info on our products.
We understand that developers differ in their editing needs and experience, that's why we divided PE Explorer into two products — PE Explorer for advanced and professional users, and Resource Tuner™ for translators, tweakers and those wanting a different look and feel. When resource editing is the major playground, the resource editor part for only $34.95 might prove a decent choice.


Features

Resource Tuner features and benefits

VISUAL RESOURCE VIEWER AND EDITOR: full visual enviroment

Support is provided for nearly every type of resources imaginable. The only one that can work with PNG, XML, Image Lists, and Type Library.
Working with a variety of different file types: EXE, DLL, ActiveX controls, MSSTYLES, SCR and other win32 executables.
Browsing and viewing resources as text, image or raw data.
Extracting a resource as a graphic image file (*.bmp, *.gif, *.jpeg, *.ico, *.cur, etc.) and Borland VCL images (ImageList & Bitmap), a media file (*.avi, *.wav), a resource script file (*.rc), a Delphi VCL form file (*.dfm), or a compiled resource file (*.res), respectively.
Option to create backup files.
Customizing the general, view and logging settings.

Advanced features

Saving multiple resources at once. You will be prompted to check the types of resources to save.
Resource optimizing, error checking and repairing automatically performed when opening a file.
XP Visual Style Manifest Wizard to insert an application manifest into the resource section.
Support for custom plug-ins to perform any startup processing. Resource Tuner ships with the UPX Unpacker plug-in.

Benefits

A resource editing solution you can use NOW!
This is the fastest, most powerful, and easiest-to-use resource editor for Windows.
You can completely customize any program you own.
Now you can open files compressed with UPX even without knowing that: your file will be unpacked automatically!
Easy way for your legacy application to take advantage of the slick new look for common controls featured in Windows XP.
You can navigate easily through the DFM forms and objects and view their contents (Image Lists, Strings List, Glyphs, Bitmaps).
Using the Plug-in API, you can write your own custom startup processing plug-in for Resource Tuner.


Resource types

Resource Tuner recognizes the following resource types:

RESOURCE TYPE | DISPLAYED AS | EDIT | REPLACE | EXTRACTED AS
AVI | raw data, can be played |  |  | *.avi
GIF | image |  |  | *.gif
ANIMATED GIF | image, can be played |  |  | *.gif
JPEG | image |  |  | *.jpg, *.jpeg
PNG | image |  |  | *.png
METAFILE | image |  |  | *.wmf
BITMAP | image |  |  | *.bmp
BITMAP (DIB) | image |  |  | *.bmp
WAVE | raw data, can be played |  |  | *.wav
CURSOR | image |  |  | *.cur
ANIM. CURSOR | animated image |  |  | *.ani
GROUP CURSOR | text |  |  | *.res
ICON | image |  |  | *.ico
GROUP ICON | text |  |  | *.res
MENU | script/menu |  |  | *.rc
DIALOG | script/dialog |  |  | *.rc
DIALOG DATA | text/raw data |  |  | *.res
STRING TABLE | script |  |  | *.rc
MESSAGE TABLE | text |  |  | *.res, *.txt
ACCELERATORS | script |  |  | *.rc
TOOLBAR | text/toolbar |  |  | *.res
PLAIN TEXT | text |  |  | *.txt
PLAIN UNICODE TEXT | text |  |  | *.txt
RICH TEXT FORMAT | formatted text |  |  | *.rtf, *.txt
HTML | text |  |  | *.htm, *.html
XML | text |  |  | *.xml, *.xsl
XP Application Manifest | text |  |  | *.xml
CAB | directory |  |  | *.cab
TYPE LIBRARY | script |  |  | *.tlb, *.txt
PE EXECUTABLE | raw data |  |  | *.exe, *.dll, *.*
NE EXECUTABLE | raw data |  |  | *.exe, *.dll, *.*
LE EXECUTABLE | raw data |  |  | *.exe, *.dll, *.*
Borland VCL DFM (*) | text |  |  | *.dfm
Borland VCL Package Info | text |  |  | *.res
Borland VCL Signature | text |  |  | *.res
VERSION INFO | formatted text |  |  | *.res
Unknown Data | raw data |  |  | *.res

(*) For Borland VCL DFM, a hierarchical presentation of all objects contained in the form is built. In this situation, Properties and Events are combined in a table for each object. If a Property contains a data type known to Resource Tuner, the data is displayed as described in the following table.

Recognized data types for Borland VCL DFM:

RESOURCE TYPE | DISPLAYED AS | EDIT | REPLACE | EXTRACTED AS
ICON | image |  |  | *.ico
BITMAP | image |  |  | *.bmp
JPEG | image, |  |  | *.jpg, *.jpeg
GIF | image |  |  | *.gif
ANIMATED GIF | image, can be played |  |  | *.gif
WINDOWS METAFILE | image |  |  | *.wmf
ENHANCED METAFILE | image |  |  | *.emf
IMAGE LIST | image list/image |  |  | *.bmp
TEXT | text |  |  | *.txt


What's new?

LEGEND

+ New feature
* Improvement/modification or bug fix

Version 1.95 – January 06, 2005

Resource editor:
* Now brings up a message if a file contains no resources.
* Bugfix: TypeLibs in the multi-language resources would occassionally display incorrectly.

UPX Unpacker plug-in:
* Now all versions of UPX are supported from 0.8x up to 1.92b.
* Now verifies the file's integrity.

Version 1.94 – November 01, 2003

Resource editor:
+ Now supports editing Accelerators.
* Now supports opening files with modified MS-DOS stubs.
* Now saves charset settings when customizing font.

UPX Unpacker plug-in:
* Added support for NRV2E_LE32 compression method. Now all versions of UPX are supported from 0.8x up to 1.90.
* Now supports unpacking files with modified UPX headers.

Version 1.93 – July 01, 2003

+ Now supports searching for strings in string resources.
+ XML files can now be displayed and edited.
* Date/Time displayed in the Log window can be turned off.

Version 1.92 – May 12, 2003

* Bugfix: Fixed an error that occurred when modifying ImageLists built with Delphi 7.
* Bugfix: The icon viewer would occaissionally display large icons incorrectly.
* Minor changes to the user interface.

Version 1.91 – February 20, 2003

+ Now supports editing DFM (Borland Delphi/Builder forms).
+ Added drag and drop support.
* Bugfix: Pasting to and from the clipboard in the dialog, menu and text modes was repaired again.
* Bugfix: The UPX Unpacker plug-in would occaissionally display resource names incorrectly.
* Bugfix: Filenames were always saved in lowercase - repaired.

Version 1.90 – October 15, 2002

+ Now supports replacing non-standard resources in a file: typelibs, cab, midi, custom resources and more.
+ Now extracts Borland VCL images (ImageList & Bitmap) at a 24 bit color depth.
* Bugfix: Pasting to and from the clipboard in the dialog, menu and text modes was repaired.
* Bugfix: Fixed minor syntax errors in saved *.rc files.
* Bugfix: Fixed minor memory and resource leaks.

Version 1.81– May 24, 2002

+ PNG files can now be displayed and replaced.
+ Added option to create backup files to the Customize dialog.
* Bugfix: Empty folders were being created when saving multiple resources at once.

Version 1.70 – March 30, 2002

+ Added ability to detect HTML and PNG file types.
+ Added the Delete/Undelete Resource feature.
+ Added ability to numerically adjust a control position and size when editing a dialog.
* Improved Icon and Bitmap detection algorithm when showing dialogs (previously Resource Tuner failed to find the needed resources on occasion).

Version 1.60 – November 15, 2001

Initial release.
The version number is 1.60 since Resource Tuner is a stand-alone version of the resource editor component of PE Explorer™ v1.60, another Heaventools product. We just synchronized the version numbers. Please visit our home page [image] http://www.heaventools.com for more info on our products.


What is next?

What's next?

Get the latest news about Resource Tuner before your friends and competitors do! For up-to-date information on Resource Tuner and other products from Heaventools point your browser to the [image] Resource Tuner news page.

If you are not connected to the Internet, you can try another time. The Resource Tuner home page address is www.restuner.com.


Overview

System requirements

Resource Tuner runs on all versions of Windows from 95 through Server 2003.

Minimum system requirements:

· Microsoft Windows® 95
· Intel Pentium® or AMD K5 processor with 133 MHz
· 15 MB free hard disk space
· Screen resolution 800x600 with 256 colors
· 16 MB RAM

Recommended system configuration:

· Microsoft Windows 98/Me/NT/2000/XP/Server 2003
· Intel Pentium II/III or AMD Athlon processor with 600 MHz (or higher)
· 50 MB free hard disk space
· Screen resolution 1024x768 with 16.7 m colors (or higher)
· 128 MB RAM (or higher)
· Internet access


Contact and support

Full service web site

http://www.restuner.com

We believe that our web site is typically the quick and easy way to find the information you are looking for. For additional assistance, submit your report, comments or suggestions online at [image] ResTuner online support web site. Your feedback is important to us in order to get an idea of how to make Resource Tuner a better product for you.

Product sales

E-mail: sales@heaventools.com

Mail

Heaventools Software
Pacific Business Centre
101-1001 West Broadway
Dept. 381
Vancouver, BC, V6H4E4
Canada

Phone: 1-604-221-2650 ext. 249

Technical support

E-mail: support@heaventools.com

If something fails to work, please note the behavior that occurs, and then contact Heaventools Technical Support. We will want to know the following items of information:

* The version of Resource Tuner that you are using as shown in the About Resource Tuner dialog box (under the Help menu).
* Windows version (including service packs and other fixes installed).
* Computer hardware: CPU class, memory and current free hard drive space.
* Please describe the problem in as much detail as possible (with a screenshot (GIF), if words fail).

Heaventools Technical Support will try to respond to all bug reports within one to two business days, and will try to resolve the problem as quickly as possible.

We want to hear from you!

The Resource Tuner team welcomes your comments and suggestions about Resource Tuner. If you have any ideas that our product will help out with please keep us posted. If you have a feature that you would like to see added to Resource Tuner, send e-mail to support@heaventools.com.


Using Resource Tuner

TABLE OF CONTENTS

BEFORE GETTING STATRED

OPEN FILE

SAVE YOUR CHANGES

RESOURCE BROWSER

XP MANIFEST WIZARD

RESOURCE EDITOR

KNOWN LIMITATIONS

F. A. Q.

KEYBOARD SHORTCUTS


Before getting started

THE IMPORTANT INFORMATION

1. Always create a backup copy of the original files before modifying! The PE structure is documented in detail at MSDN (go see [image] http://msdn.microsoft.com/library/specs/msdn_pecoff.htm, see also the Microsoft Developer Journal article, February 2002: An In-Depth Look into the Win32 Portable Executable File Format by Matt Pietrek), but the interaction of the various components is very extensive making it very difficult to reveal all the interactions within the file. Moreover, the original programmer may have implemented mechanisms to verify the integrity of the file against modifications.
In most cases modifying resources does not affect the normal operation of the file, but occaisionally some modified files may be invalid.

2. Do not modify resources in files which have Import, Delay Import, or Export sections following the Resource section (this is actually quite rare anyway). The problem is that in such cases the respective structures require alteration. This will be solved in future versions of another Heaventools product, PE Explorer™.

3. The modification of resources is locked if the section contains other data (besides resources) present in the Data Directory. The exception is Debug Info since this information does not affect the program functionality. In the other cases Resource Tuner adjusts all offsets in such a manner that the access to the Certificate Table and Debug Info remains correct and the given information is not lost. For more, see another Heaventools product, PE Explorer™. Please visit our home page [image] http://www.heaventools.com for more info on our products.

4. Be careful if using Windows 2000 or an operating system with the System File Checker (SFC) enabled. When modifying files registered by the OS - i.e. any file from the original installation or from updates such as service packs, DirectX, etc - you should disable SFC or register the modified file in the system manually. Otherwise the OS will consider the file damaged and automatically restore the original from the distribution kit.

5. See the Keyboard Shortcuts section of the Resource Tuner help for details of additional keyboard shortcuts you can use.


Open

Open File

OPENING A FILE

To open a file for browsing or editing resources, click the toolbutton to the left or click File > Open [CTRL+O]. The dropdown menu next to the toolbutton gives you quick access to recently open files.

It is recommended to perform all file operations with copies of the originals and then only after you have moved the copies to a separate directory other than the parent or home directory of the executable.
The benefits are obvious and the not so obvious ones are OLE embedded executables then can still call some of their other DLLs or methods from DLLs in the parent directory.

Tip: If you type in the name of a folder (expecting to see folder contents) in the Open dialog, Resource Tuner would try to open folder as a file; add a backslash (i.e. "\") to the folder name to avoid this.

You can open a file from the command line.
Usage: restuner.exe <filename>

Resource Tuner provides three functions that are automatically performed when opening a file: unpacking files compressed with UPX using the Plug-In subsystem, error checking, and precompiling resources.

IF OPENING A FILE PRODUCES AN ERROR

If opening a file produces an error, that file is most likely damaged, packed or compressed. To continue working with this file requires a more powerful tool, such as Heaventools PE Explorer.

For more information about PE Explorer visit our home page: http://www.heaventools.com.


Save

Save Your Changes

SAVING YOUR CHANGES

To save your changes, click the toolbutton to the left or click File > Save As... [CTRL+S].

It makes sense to do it after modification in structure of the original file. Resource Tuner let you save the modified file with the same extension as the original file has. However, you have an option to create a backup copy of the target file (enabled by default). So by no means you can overwrite any important files.

The newly created file will be saved in the same folder where the original file is located. To set the default Project folder, click Tools > Customize > General and select a desired project folder location. In this case, a backup copy of the target file will also be created in the Project folder. See also: Customizing Resource Tuner.

Tip: The term "image file" is usually used instead of "executable file", because the latter sometimes is taken to mean only an .EXE file. An image file can be thought of as a "memory image" or "mirror image".


Resource Browser

Most items stored in the resource section make up the visual part of a program. A programmer defines the items to include in the resources of an executable by defining them inside a resource file (*.rc). A special compiler is used on these *.rc files to convert the definitions into a binary form suitable for linking with the executable. With Resource Tuner™ you can examine an approximation of what the original *.rc file looked like, and you can save that to disk and use it with your own programs (some minor adaptation to your specific resource compiler may be required).

You can view (or play, if possible), extract, delete, modify, edit, or replace a selected resource. Using the XP Visual Style Manifest Wizard, you can also insert an application manifest into the resource section of the executable.

VIEWING

When you display resources in the Resource Browser, you see them listed by name. A list of the file’s resources is displayed in the resource tree where the first level defines the resource type. This tree can be expanded or collapsed by clicking with right mouse button on the chosen resource type and selecting an action from popup menu.

There are standard resource types such as CURSOR/CURSOR_GROUP, BITMAP, ICON/ICON_GROUP, MENU, DIALOG, STRINGTABLE, MESSAGETABLE, TYPELIB, ACCELERATORS and VERSIONINFO. Some resources such as Strings and Dialogs may be stored multiple times for different languages.

Other resource types may also be defined by the programmer and are displayed in upper case. A custom resource is used to store most any type of binary data within a resource file. Common data types that might be stored as custom resources are sound (.wav) and video (.avi) files.

A selected resource will be displayed either as a graphic image, a text, or as raw binary data (then [F4] key toggles the browse mode, [F8] - code page (DOS/WIN)).

Programs compiled using the Borland VCL do not commonly have menu, dialog, or accelerator resources, but store this information in a resource type named RCData or the Application-defined resource (raw data) that holds the information that were in the DFM file before the compilation.

If VCL Delphi/C++ Builder is the case, and RCData contains DFM forms, all the found objects with all assigned properties and events will be displayed in a hierarchical tree. You can navigate easily through the objects and save their contents (Image Lists, Strings List, Glyphs, Bitmaps etc). PackageInfo shows all units used during compiling an executable. DVCLAL (this stands for "Delphi Visual Component Libraray Access License") shows the compiler version for Borland products.

THE TOOLBAR

Resource Editor

Delete a selected resource

Undelete (restore)

Copy a selected resource to clipboard.

Insert an application manifest into the resource section. See XP Visual Style Manifest Wizard

Play AVI, animated GIF or WAV files.

Show/Hide a dialog or menu compiled form. You can also minimize the form.

Search tree button - allows you search through the resource tree (useful for searching RCData content).

Show properties of a selected resource (Language ID, Type, Raw size, etc) as follows:

Tip: The language ID is a word integer value made up of a primary language and its sublanguage which is defined by Windows. If the resource item is “language neutral” then this value is zero.


Extracting and Saving to File

EXTRACTING AND SAVING TO FILE

Press this button to save a resource as a graphic image file (*.bmp, *.gif, *.ico, *.cur, etc.), a media file (*.avi, *.wav), a resource script file (*.rc), a VCL form file (*.dfm), or a compiled resource file (*.res), respectively. Then you can modify them with another tool or use with another application.

Press this button to save Multiple Resources at Once. You will be prompted to check the types of resources to save:


XP Visual Style Manifest Wizard

The XP Visual Style Manifest Wizard allows your application to take advantage of the new common control styles and appearances featured in Windows XP.

The XP Visual Style Manifest Wizard button brings up a wizard used to insert an application manifest into the resource section.

The wizard is very easy to use. There are two fields to fill out, application name and description, from which the wizard generates a visual style manifest for your application. See also: How to insert an application manifest.

The manifest indicates to the operating system that ComCtl32.dll version 6 should be used when it is available. Version 6 includes some new controls and new options for other controls, but the biggest change is support for changing the appearance of controls in a window.

Unlike earlier versions of ComCtl32.dll, version 6 is not redistributable. The only way you can use version 6 is to use an operating system that contains it. Windows XP ships with both version 5 and version 6. By default, applications use the user controls defined in User32.dll and the common controls defined in ComCtl32.dll version 5. If you want your application to use visual styles, you must add an application manifest that indicates that ComCtl32.dll version 6 should be used if it is available.

After generating the manifest, the wizard inserts it into the resource section of the executable and makes the necessary adjustments to the image.

The wizard is very easy to use - just follow the instructions and fill in the blanks accordingly. Microsoft recommends using the following format for your application name: Organization.Division.Appname. For example, Microsoft.Windows.MyCoolApp.

Pic.1 Here is how the common controls for an ordinary application look on Windows XP:

Pic.2 And here is how that same application appears after a manifest has been inserted. Inserting a style manifest is an easy way for legacy apps take advantage of the new look for common control styles on Windows XP:

Applications utilizing the more advanced common controls (ie. ListViews, Toolbars, etc.) must link to ComCtl32.dll and make the necessary initialization calls in order for the Windows XP Visual Style manifest to operate properly. Otherwise there is a probability that all of the controls using ComCtrl32.dll will fail at creation. Having a link to ComCtrl is optimal - necessary in most cases but not all. Inserting a style manifest into such an application that doesn't meet these basic requirements may render it inoperable.

It is impossible for Resource Tuner to add the linkage to ComCtl32.dll or to insert the initialization code for you. However, the wizard will alert you if it is unable to verify that the target file meets these requirements.

As always, we recommend that you make a backup copy of the target file before modifying it.


Resource Editor

EDITING RESOURCES

Resource Tuner attempts to be the most convenient and easy-to-use resource editor available for Windows. Visual editing features let you quickly modify the resources without writing any scripts. All changes made to resources can be watched on the screen and, if you are not satisfied with the result, you can return to the previous state. If changing some values would result in unpleasant consequences, modification of the given data will usually be disallowed. However, in some cases Resource Tuner relies on your common sense and understanding of what you are going to do.

Note: Please read Important Notes before editing resources!

To edit a resource, you can do either of the following:

• [image] Press the Resource Editor button to edit a selected resource. Depending on the resource type, Resource Tuner automatically starts the appropriate editor mode (Graphics, Dialog, Menu, Accelerators, DFM, Text, Media or Version Info), if one is available. If an editor mode is not available (for example, for a user-defined resource), Resource Tuner brings the Replace A Non-Standard Resource dialog.

• Double-click the resource name in the Resource Tree. The Resource Editor can be also opened from the popup menu which is displayed by right-clicking the Resource Tree view.

• Select the resource name in the Resource Tree and choose either Resource|Edit or Resource|Edit as Text. Resource|Edit loads an editor, if one is available. Resource|Edit as Text always starts the internal text editor.

Graphics mode: lets you replace a selected graphic resource with another from a file or paste it from the clipboard. See also: How to replace a graphic image.

Media mode: lets you replace a selected audio/video resource with another from a file. These resources can be edited in the same manner as the graphic resources. See also: How to replace a non-standard resource.

Dialog mode: lets you visually modify a selected dialog and its controls: resize, redesign, set style parameters, translate or simply change font properties. See also: How to modify a dialog.

Menu mode: lets you edit a selected menu item. The only limitations are you can't edit separators (seems to be useless), Owner Draw items (they are rendered by the executable itself), and bitmaps (if any). See also: How to edit a menu item.

Accelerators mode: lets you edit a selected accelerator item. Accelerators are closely related to menus both provide the user with access to an application's command set. See also: How to edit an accelerator item.

DFM mode: lets you edit a selected object with all assigned properties and events displayed in a hierarchical tree. You can navigate easily through the objects and edit their contents (Image Lists, Strings List, Glyphs, Bitmaps etc). See also: How to edit DFM (Delphi Form).

Text mode: lets you edit a selected string or replace it with another from a file. See also: How to edit stringtable strings.

Version Info mode: lets you edit a selected Version Information resource. See also: How to change the version information.

XP Visual Style Manifest Wizard: lets you insert an application manifest into the resource section. See also: How to insert an application manifest.

See the Keyboard Shortcuts section of the help for details of additional keyboard shortcuts you can use.

DELETING RESOURCES

To delete a target resource, select the resource item in the Resource Tree view and use the Delete button [SHIFT-Ctrl-D] in the tool bar. The deleted items are indicated immediately by the x marker.

Use the Undelete button [Shift-Cttrl-Z] in the tool bar to restore the deleted items. Note that you can restore any changes until you save your changes to file.

ADDING RESOURCES

For the time being you can only add an application manifest into the resource section, but later on we plan to add more options.

See also: How to insert an application manifest.


Using - Resources notes

Resource Editor: Important notes

SOME KNOWN LIMITATIONS

1. When modifying dialogs, not all values of Style and ExStyle parameters can be updated on the spot because the edited object would receive properties that make further editing impossible, or would cause object will cease to be displayed correctly. The values of Style and ExStyle parameters which have no effect in design time are shown below.

Parameters | When editing the dialog main window | When editing controls
WS_CHILD | disabled | disabled
WS_POPUP | disabled | disabled
WS_VISIBLE | yes | no
WS_MINIMIZE | yes | yes
WS_MAXIMIZE | yes | yes
WS_CLIPSIBLINGS | no | sometimes
WS_EX_TRANSPARENT | no | sometimes

The result of changes made to controls may vary depending on the Windows version, Style/ExStyle combinations, and the type of control. For example, turning on WS_EX_RIGHT in Win2000 moves the form caption to the right regardless of what style is set by default in the system. Win95/98 differs if the "we-write-from-left-to-right" style is set in the system.

2. It is impossible to correctly display the controls created with the Owner Draw Style being set. Such controls are displayed correctly only by the edited program itself at run-time.

3. In the current version all predefined control classes - BUTTON, EDIT, LISTBOX, SCROLLBAR and STATIC - are handled correctly except for COMBOBOX. For the moment, you can't change height of a COMBOBOX. (See the respective Help section for descriptions of these various classes).

4. The following classes are also displayed and can be edited:

msctls_statusbar32
msctls_trackbar32
msctls_progress32
SysListView32
SysTreeView32
SysTabControl32
SysAnimate32
SysDateTimePick32
RichEdit

For msctls_updown32 only normal displaying is possible, because when creating this type of control with the certain combination of Styles, is attached automatically to the control created before it. Having changed some values of Styles, it is necessary to re-create the window, and the new ID for UpDown appears to be the biggest among existing IDs of other controls. Accordingly, the newly created UpDown is attached to the control which has the biggest ID among existing IDs, and as a result it does not appear in the right place. In the future version of Resource Tuner this limitation may be removed.

There are also no specific constant names of the Style parameter for the classes listed above.

5. It is impossible to correctly display any User Defined classes. Like Owner Draw, the given classes are displayed correctly only in run time. While editing, they are replaced by STATIC. You can change their size, position and values of Style/ExStyle parameters, but it is not a fact that all these changes will be displayed when you run the modified executable.

6. Do not modify component properties that you are not familiar with. Entering values outside the range of valid values for a property may render the target program inoperable. Because of the infinite variability of controls and their properties, Resource Tuner can not alert you when out of range values are entered.


Customing Resource Tuner

Customizing Resource Tuner

Selecting "Customize" from the Tools menu will display the Customization dialog. It provides options for you to customize the appearance and functionality of Resource Tuner.

When this is open, you can completely customize the general, view and logging settings.


F.A.Q.

Frequently asked questions

For your convenience, a list of frequently asked questions is provided below. Please be sure to review this list, as it is very possible that your question has already been answered here. If the solution you seek is not here, please feel free to contact our technical support.

General

  • Resource Tuner fails if I use it to examine itself. Is this intentional?
  • Is this a developer tool, or is this something a general computer user would use?
  • What is the difference between the trial version and the full version?

File Open

  • I got an immediate error of something like "This file is likely damaged, packed or compressed". What can I do?
  • When I try to put my DLL back I get the following error: Can't create new image file, the original file has been probably packed. Any hints?
  • What are packers?
  • I got an immediate error of something like "Incompatible" and "of type NE". What is a "NE" type file?
  • What is a PE file... I heard of them but thought my OS couldn't run them?
  • Will the Resource Tuner work with NE and other 16-bit files?
  • If Resource Tuner doesn't work on NE type files, do you have a product that does?

File Save

  • Why the original file size is increased after a simple "Save as..." operation?

Resource Editor

  • I can't copy and paste icons from any file, including .exe and .dll files. Any ideas?

Command Line

  • What about a command line version?

Plug-ins

  • How can I write my own custom plug-in for Resource Tuner?

General

Resource Tuner fails if I use it to examine itself. Is this intentional?

Yes. It was our intent.

Is this a developer tool, or is this something a general computer user would use?

Both. Anyone can play with the file resources and learn a lot from it. Training for the initial use is almost not required at all. No programming skills required.

What is the difference between the trial version and the full version?

Your evaluation copy of Resource Tuner is a full-featured release. This means that the same capabilities available in the registered software are present in the non-registered software. This allows you to try out all the features in Resource Tuner to confirm that they work to your satisfaction.

File Open

I got an immediate error of something like "This file is likely damaged, packed or compressed". What can I do?

Nothing. This is not viewed as a bug. We are not going to defeat the security attempts of other software authors. Resource Tuner unpacks only files compressed with UPX using the Plug-In subsystem.

When I try to put my DLL back I get the following error: Can't create new image file, the original file has been probably packed. Any hints?

Please be advised that your dll might be really packed! Our software unpacks only files compressed with UPX. So if your dll was packed by any other third party packer, you have to unpack it before modifying. Otherwise the chances are you can't create a new image file.

What are packers?

Packers are utilities that compress Windows portable executables (EXE, DLL, etc) significantly while leaving them 100% functional. Most of them encrypt data and resources and protect exe files from reverse engineering.

I got an immediate error of something like "Incompatible" and "of type NE". What is a "NE" type file?

Resource Tuner works with PE files only. A NE (or "New Executable") file is a 16-bit application intended to run on Windows® 3.xx.

What is a PE file... I heard of them but thought my OS couldn't run them?

"PE" stands for "Portable Executable". The term "Portable Executable" was chosen because the intent was to have a common file format for all flavors of Windows, on all supported CPUs. A PE file is a 32 bit executable developed by Microsoft for NT (and W9x). The other notable executable types that run on MS platforms are "MZ" (DOS), "NE" and "LE" - but those formats are obsolete (but they will still run). Open an exe file in a hex editor or binary viewer and the first two values in the file will be 'MZ' - yes the DOS header is still there. Scan down 128 bytes and you should find the values 'PE' - this is where the PE format takes over. (For greater detail download [image] PE Explorer, our flagship product, and consult the help file.)

Not all PE files have the 'exe' extension. Other notable PE files have the extensions "dll", "scr", "sys", "cpl" and "ocx", and even "msstyles" featured in Windows XP. Also note that not all PE files will run on their own - dll's for example. PE files that run on their own include exe, scr and cpl.

Will the Resource Tuner work with NE and other 16-bit files?

No. The NE format is obsolete.

If Resource Tuner doesn't work on NE type files, do you have a product that does?

No. At any rate, knowledge of 16-bit format makes less sense especially since the 64 bit processors have hit the market.

File Save

If I open an executable with Resource Tuner and then go to SaveAs and save the executable under a different name WITHOUT making ANY changes to it, and then I compare the two files with a hex editor, there are MANY changes to the file. Why are there changes even though I didn't make any?

Resource Tuner provides two functions that are automatically performed when opening a file: unpacking files compressed with UPX using the Plug-In subsystem, and error checking.

If your target file was packed with UPX, it was unpacked automatically and saved unpacked. That is why the original file size is increased. Check out the logfile for details.

The next thing Resource Tuner does is re-compiling the file resources according to the MS PE file specification. That may also be the reason why the original file size is changed after a simple "Save as..." operation.

If you don't want any changes to be made, just do not save.

Resource Editor

I can't copy and paste icons from any file, including .exe and .dll files. Any ideas?

The clipboard does not support copying/pasting .ico files. They look like graphic images but have their own format. To extact icons, use Save to disk. To replace icons, use Open the source file from disk instead Paste from the clipboard.

Command Line

What about a command line version?

It is in the ToDo List. We are currently working on new features for Resource Tuner version 2.0.

Plug-ins

How can I write my own custom plug-in for Resource Tuner?

See the Resource Tuner Help for the plug-in API.


Using - Keyboard shortcuts

Keyboard Shortcuts

These tables list the shortcuts available in Resource Tuner.

MAIN WINDOW KEYBOARD SHORTCUTS

Key | Action
F1 | Help
Ctrl+O | Open File
Ctrl+S | Save As New Image

RESOURCE VIEWER/EDITOR KEYBOARD SHORTCUTS

Key | Action
Shift+Ctrl+S | Save Resource as ...
Shift+Ctrl+A | Save Multiple Resources at once
Shift+Ctrl+E | Open Resource Editor
Shift+Ctrl+D | Delete a resource
Shift+Ctrl+Z | Undelete
Shift+Ctrl+W | Open XP Manifest Wizard
Shift+Ctrl+L | Play
Shift+Ctrl+O | Stop
Shift+Ctrl+H | Show/Hide a dialog form
Ctrl+F | Search the Resource Tree
Ctrl+C | Copy to clipboard
Ctrl+V | Paste from clipboard
Shift+Ctrl+P | View Properties
Ctrl+R | Restore All (Total rollback)
Ctrl+Z | Clear All Changes (Local rollback)
Ctrl+F | Change Font
Ctrl+TAB | Go to the next control out of the edit field
Shift+Ctrl+TAB | Go backwards out of the edit field
Ctrl+O | Open a source file
F4 | Toggles the browse mode for a resource displayed as raw data
F8 | Toggles the code page for a resource displayed as raw data
Shift+F10 | Right-click with the keyboard

SPLASH SCREEN KEYBOARD SHORTCUTS

Key | Action
W | Go to the Resource Tuner home web page
S | Send a message to TechSupport


How to...

As always, we recommend that you make a backup copy of the target file before modifying it. To this end the option to create a backup copy of the target file is enabled by default. This safety mechanism is intended to prevent the accidental overwriting of any important files. To set the default Project folder, click Tools > Customize > General and select a desired project folder location.

REPLACE A GRAPHIC IMAGE (BITMAP, ICON, CURSOR, ETC)

MODIFY A DIALOG

EDIT A MENU ITEM

EDIT AN ACCELERATOR ITEM

EDIT STRINGTABLE STRINGS

EDIT DELPHI FORMS (DFM)

DELETE A RESOURCE

INSERT AN APPLICATION MANIFEST

CHANGE THE VERSION INFORMATION

REPLACE A NON-STANDARD RESOURCE


How to replace a graphic image

If the resource item to be replaced is an icon, cursor, or a bitmap, the source can be an *.ico, *.cur or *.bmp/gif/png file respectively. The source can also be pasted from the clipboard.

1. Expand the 'Bitmap' folder (it can also be 'GIF', 'PNG', 'Cursor', 'Icon' etc.)
2. Select the graphic resource item to be replaced in the Resource Tree.
3. With this bitmap resource, select the 'Save Resource As...' button [image] from the button bar (first button from left) and save the file to your desktop.
4. Use your favourite graphics editing program to edit this file. Make sure that your new image is no bigger that the image it is replacing.
5. Back inside Resorce Tuner, highlight resource item to be replaced and click on the Resource Editor button [image] on the button bar (third button from left).
6. Select the Open Source File [image] button (Ctrl+O) from the button bar as illustrated below and select your edited file. Or paste the image from the clipboard (Ctrl+V).

7. Press OK to close the Resource Editor and select 'File' -> 'Save File As ...' to save the changes you've just made to the target file. If warned that the image size has changed, click "Yes" from the next dialog box to update the file size.

When replacing icons and cursors, make certain that the replacement sources are the same size and have the same number of colors as the item to be replaced (e.g. a 16x16 4 bit icon can not be replaced with a 32x32 8 bit icon).

Programs compiled using the Borland VCL store images in a resource type named RCData.

1. Expand the 'RCData' folder. Click the plus signs until it brings down a Bitmap below it.
2. Select the Bitmap item to be replaced in the Image List.
3. With this bitmap item, select the 'Save Resource As...' button [image] from the button bar (first button from left) and save the file to your desktop. Or right-click to copy to the clipboard.
4. Use your favourite graphics editing program to edit this file. Make sure that your new image is no bigger that the image it is replacing.
5. Back inside Resorce Tuner, highlight resource item to be replaced and click on the Resource Editor button [image] on the button bar (third button from left).
6. Select the Open Source File [image] button (Ctrl+O) from the button bar (the icons next to the apply button as illustrated below) and select your edited file. Or paste the image from the clipboard (Ctrl+V).

7. Press Apply, then at the bottom click OK to close the Resource Editor and select 'File' -> 'Save File As ...' to save the changes you've just made to the target file. If warned that the image size has changed, click "Yes" from the next dialog box to update the file size.


How to modify a dialog

Dialog edit mode lets you visually modify a selected dialog and its controls. You can resize, redesign, and reposition dialogs or simply change their font properties to suit your wishes.
However, Windows® imposes restrictions on changes that can be made. These limitations are described in Important Notes.

Size and position changes to dialog boxes and child controls are automatically reflected in the resource script.
For more information see: DIALOG Resource.

1. Select the dialog resource item to be changed in the Resource Tree view.
2. Open the dialog resource using the "Resource Editor" button [image] or the popup menu displayed by right-clicking the Resource Tree. Or simply double-click the resource item directly.
3. Select a control by clicking it in the displayed dialog. The selected control will show resizing handles.
4. A dialog box can be modified primarily by editing the item lable - e.g. the caption, as well as changing the size or position of a control. This can be accomplished using the mouse as well as entering the new properties directly into the corresponding edit fields.
5. Press OK to close the Resource Editor and select 'File' -> 'Save File As ...' to save the altered file to disk. If warned that the image size has changed, click "Yes" to update the file size.

Control IDs can not be edited. These values are hard coded into the target file. Changing them is likely to cause the modified program to crash.

Show/Hide a dialog form.

Change font properties of a dialog form (when selecting a dialog node).

Rollback. There are two rollback buttons: Total rollback [image] restores all changes, Local rollback [image] restores only changes made to a selected control.
Any change you make can be restored prior to quitting the editor using the OK button. To abort your changes quit the editor using the Cancel button.

STYLE PARAMETERS

This menu allows for changing the Style and ExStyle parameters of a selected control:

You can set/reset the extended style parameters for a dialog box and its control items (e.g. "right-to-left" reading order for Hebrew/Arabic script as well as "right-aligned text").
For more information regarding the various extended styles, see CONTROL CLASSES AND STYLES.


How to edit a menu item

A menu resource is a collection of items that define the appearance and function of an application menu. A menu is a specialized input control that lets the user select commands and submenus from a list of menu items.

A menu is organized into a hierarchical structure comprised of menu items and submenus. A menu item that opens a submenu is called a popup menu item. See also: MENU Resource.

A menu resource is displayed graphically in the Menu Edit mode. Menu Edit mode shows a menu in a tree view with submenus, menu and popup items.

1. Select the target menu resource from the Resource Tree.
2. Press the Resource Editor button [image] to edit this selected menu resource.
3. Select the menu item from the Menu Tree and make changes to its caption.
4. Press OK to close the Resource Editor and select 'File' -> 'Save File As ...' to save the changes you've just made to the target file. If warned that the image size has changed, click "Yes" to update the file size.

Menu IDs can not be edited. These values are hard coded into the target file. Changing them is likely to cause the modified program to crash.

Show/Hide a menu form.

Rollback. There are two rollback buttons: Total rollback [image] restores all changes, Local rollback [image] restores only changes made to a selected menu item.

Any change you make can be restored prior to quitting the editor using the OK button. To abort your changes quit the editor using the Cancel button.


How to edit accelerators

Accelerators are closely related to menus both provide the user with access to an application's command set. Typically, users rely on an application's menus to learn the command set and then switch over to using accelerators as they become more proficient with the application. Accelerators provide faster, more direct access to commands than menus do.

At a minimum, an application should provide accelerators for the more commonly used commands. Although accelerators typically generate commands that exist as menu items, they can also generate commands that have no equivalent menu items. See also: ACCELERATOR Table Resource.

An ASCII character code or a virtual-key code can be used to define the accelerator. An ASCII character code makes the accelerator case sensitive. Thus, using the ASCII "C" character defines the accelerator as ALT+C rather than ALT+c. However, case-sensitive accelerators can be confusing to use. For example, the ALT+C accelerator will be generated if the CAPS LOCK key is down or if the SHIFT key is down, but not if both are down.

Typically, accelerators don't need to be case sensitive, so most applications use virtual-key codes for accelerators rather than ASCII character codes.

Avoid accelerators that conflict with an application's menu mnemonics, because the accelerator overrides the mnemonic, which can confuse the user.

1. Select the target accelerator resource from the Resource Tree.
2. Press the Resource Editor button [image] to edit this selected accelerator table.
3. Select the key item from the Table and make changes to its flags or code.
4. Press OK to close the Resource Editor and select 'File' -> 'Save File As ...' to save the changes you've just made to the target file. If warned that the image size has changed, click "Yes" to update the file size.

Accelerator IDs can not be edited. These values are hard coded into the target file. Changing them is likely to cause the modified program to crash.

Rollback. There are two rollback buttons: Total rollback [image] restores all changes, Local rollback [image] restores only changes made to a selected menu item.

Any change you make can be restored prior to quitting the editor using the OK button. To abort your changes quit the editor using the Cancel button.


How to edit strings

How to edit stringtable strings

Stringtable resources specify a group of one or more null-terminated strings each limited to a maximum of 4,097 characters.
Each string comprises an entry in a given stingtable and corresponds with a unique ID that identifies it. Strings stored in resource stringtables are primarily used as text in message boxes, list boxes, combo boxes, tooltips, and command displays in the statusbar. Stingtable strings can also contain control characters and placeholders (e.g., %d, %s). See also: STRINGTABLE Resource.

1. Select the stringtable resource to be edited in the Resource Tree.
2. Press the Resource Editor button [image] to edit a selected stringtable.
3. Select the string entry from the table and make any desired changes. You can also open a text file to use as a source (Ctrl+O) or paste text from clipboard (Ctrl+V).
A missing string or improperly altered placeholder string can cause a modified program to crash at run time. So be careful.
4. Press OK to close the Resource Editor and select 'File' -> 'Save File As ...' to save the changes you've just made to the target file. If warned that the image size has changed, click "Yes" to update the file size.

String IDs can not be edited. These values are hard coded into the target file. Changing them is likely to cause the modified program to crash.

Open the source text file (Ctrl+O).

Paste the text from clipboard (Ctrl+V).

Rollback. There are two rollback buttons: Total rollback [image] restores all changes, Local rollback [image] restores only changes made to a selected string entry.

Any change you make can be restored prior to quitting the editor using the OK button. To abort your changes quit the editor using the Cancel button.


How to edit a Delphi form

Programs compiled using the Borland® Delphi/C++ Builder do not commonly have menu, dialog, or accelerator resources, but store this information in a resource type named RCData that holds the information that were in the DFM (Delphi Form Module) file before the compilation.

When examining a program written in Delphi/C++ Builder, Resource Tuner visualizes in text mode all the loaded DFMs of the target executable and reconsitutes them in editable form. For more information see: DFM Resource.

DFM edit mode lets you visually modify a selected form and its controls as well as component properties and events. You can resize, redesign, and reposition controls or simply change their properties to suit your wishes.

1. Select the DFM resource item to be edited in the Resource Tree view.
2. Open the DFM resource using the "Resource Editor" button [image] or the popup menu displayed by right-clicking the Resource Tree. Or simply double-click the resource item directly.
3. Navigate through the objects displayed in a hierarchical tree to find an object to be edited. All assigned properties and events will be displayed .
4. Select an object property or value entry by clicking it in the displayed listview.
5. Make any desired changes. Improperly altered property can cause a modified program to crash at run time. So be careful.
6. Press the Apply button to apply your newly entered value for this property or event.
7. Press OK to close the Resource Editor and select 'File' -> 'Save File As ...' to save the changes you've just made to the target file. If warned that the image size has changed, click "Yes" to update the file size.

Do not modify component properties that you are not familiar with! Entering values outside the range of valid values for a property may render the target program inoperable. Because of the infinite variability of controls and their properties, Resource Tuner can not alert you when out of range values are entered.

Open the source text/image file (Ctrl+O).

Paste the text/image from clipboard (Ctrl+V).

Rollback. There are two rollback buttons: Total rollback [image] restores all changes, Local rollback [image] restores only changes made to a selected string entry.

Any change you make can be restored prior to quitting the editor using the OK button. To abort your changes quit the editor using the Cancel button.


How to delete a resource

Select the item to be deleted in the Resource Tree view. Press the Delete button on the tool bar or use the hotkey combination [Shift-Ctrl-D]. Items selected for deletion are indicated by an x marker.

To restore deleted items, use the Undelete button on the toolbar or use the hotkey combination [Shift-Ctrl-Z].
Changes are made permanent only after you have saved them to the file.

Select 'File' -> 'Save File As ...' to save the changes you've just made to the target file. If warned that the image size has changed, click "Yes" to update the file size.


How to insert an application manifest

Using unique XP Visual Style Manifest Wizard, you can now incorporate Windows XP Visual Style into your application. The wizard inserts an application manifest into the resource section of the executable, allowing your legacy application to take advantage of the slick new look for common controls featured in Windows XP.

The application manifest directs WindowsXP to use ComCtl32.dll version 6 if it is available. Version 6 introduces new controls and new options for other controls, but more importantly provies support for changing the appearance of controls in a window. See also: Application Manifest.

1. Click the XP Visual Style Manifest Wizard button [image] to bring up the wizard.
2. Read the important information and click Next.
3. Fill out the application name and description fields. The wizard generates a visual style manifest for your application using these fields. Follow the instructions and fill in the blanks accordingly.
4. Click Finish to apply your newly entered data.
5. Check the Resource Tree to verify that the newly created manifest resource is present.
6. Click the "Save File As..." button [image] on toolbar to save the altered file to disk. You can also use "Save File As..." from the File menu or the [CTRL+S] combination to save your changes.


How to edit the version information

How to change the version information

VersionInfo resources contain special information about a file, such as version number, intended operating system, company name, language code page, and original file name. This information is displayed on the version tab of the property sheet dialog displayed by selecting the "properties" item from the right mouse button context menu in Windows Explorer.
For additional information see: VERSIONINFO Resource.

1. Select the version info resource item to be edited in the Resource Tree view.
2. Open the version info for editing using the "Resource Editor" button [image] or the popup menu which is displayed by right-clicking the Resource Tree. Or simply double-click the resource item directly.
3. Select a StringFileInfo value entry by clicking it in the displayed listview.
4. Double-click the StringFileInfo value entry to open the Value Editor dialog box.
5. Turning off some of the checkboxes will delete the corresponding StringFileInfo value entries.
6. Press OK to close the Resource Editor and select 'File' -> 'Save File As ...' to save the changes you've just made to the target file. If warned that the image size has changed, click "Yes" to update the file size.

The Rollback button lets you restore all changes.

Any change you make can be restored prior to quitting the editor using the OK button. To abort your changes quit the editor using the Cancel button.


How to replace non-standard resources

A custom resource is used to store most any type of binary data within a resource file. Common data types that might be stored as custom resources are sound (.wav) and video (.avi) files.

Using Resource Tuner you can replace non-standard resources in a file: typelibs, cab, midi, custom resources and more.

It is important to note that editing some types of binary resources can introduce additional bytes into the resource. Such changes may cause the file to fault during execution. Unfortunately this is one of the inherent risks that comes with modifying executable files.

Warning! Resource Tuner can not validate the content of the data you are loading from disk. Carelessly swapping out this data may render the modified executable inoperable.

1. Select the custom resource item to be replaced in the Resource Tree.
2. Export it to a disk using the "Save Resource As" button [image] or the popup menu displayed by right-clicking the Resource Tree.
3. Edit the file externally using third party editing software (e.g. a wave file or binary editor).
4. Highlight the resource item to be replaced.
5. Press the Resource Editor button [image] to bring up the "Replace A Resource" dialog.
6. Press the Folder icon [image] to open and import the edited file from step 3 or use the [Ctrl+O] key combination.
7. Press OK to close the Resource Editor and select 'File' -> 'Save File As ...' to save the changes you've just made to the target file. If warned that the image size has changed, click "Yes" to update the file size.


Plug-ins

TABLE OF CONTENTS

PLUG-INS OVERVIEW

UPX UNPACKER PLUG-IN

PLUG-INS MANAGER

PLUG-IN API - FUNCTION AND TYPES


Plug-ins overview

A plug-in is an application extension – much like a Windows DLL (Dynamic Link Library) – that allows program functionality to be added to Resource Tuner without changing the main application code. A plug-in can be created and distributed by Heaventools, or it can belong to a third-party company. The main goal is allowing the user to create plug-ins for crypted files handling and unpacking the packed files. Then additional decoding formats can be supported by simply adding more plug-ins.

THE PLUG-INS FOLDER

Within the Resource Tuner directory there must be a subdirectory named PLUGINS. All plug-ins (DLLs) should be placed in this folder. Currently, the location of the plugins cannot be customized.

HOW IT WORKS

As Resource Tuner starts, it firstly scans the plug-ins folder for DLLs, then determines whether they contain the required functions described below, and finally registers these DLLs.

Furthermore, when executing an operation, Resource Tuner locates plug-ins that expand the operation, and sequentially executes each plug-in function.

There can also be some functions executed specifically by a user request. For example, a particular plug-in could be triggered when specific options are set, or menu items are chosen (e.g. About, etc.).

Using the Plug-ins Manager, you can set priority of executing plug-ins : Menu Tools | Plug-ins Manager.

IMPORTANT: Plug-ins are not permanently loaded into memory, they get loaded only when required. Please take it into account when writing your own custom plug-ins. We also recomend that any plug-in code be kept as compact as possible so as to maximise the performance of group operations (i.e. the sequential execution of several different plug-ins).

Resource Tuner plug-in API will be extended, therefore when writing custom plug-ins, it is important to pay special attention to the remarks made in the description of Functions and Types, and abide by them. Following these guidelines will keep your coding compatible with future versions of Resource Tuner.

Currently, the support for three functions is documented.
- The plug-in registration process.
- Displaying information about the developer (About). This is an optional function.
- Pre-processing of a file before control is transfered to Resource Tuner.
(Examples in both Pascal and C demonstrating usage of all these functions are included. See the Plugins\Source directory for more).


UPX Unpacker plug-in

Resource Tuner ships with the UPX Unpacker plug-in. This is a start-up processing plug-in that plugs into Resource Tuner for unpacking files compressed with UPX by Markus F.X.J. Oberhumer & Laszlo Molnar (see [image] http://upx.sourceforge.net).

USING THE UPX UNPACKER PLUG-IN WITH RESOURCE TUNER

When you open up a file with Resource Tuner, the UPX Unpacker plug-in detects if a file is packed with UPX, and if that is the case, a file will be unpacked automatically. A new file image will also be saved unpacked.

LIMITATIONS

1. Win32/PE files only.
2. The compressed files must have their original PE header.
3. All versions of UPX are supported from 0.8x up to 1.90.
4. NRV2B_LE32, NRV2E_LE32 and NRV2D_LE32 compressions methods only.


Plug-ins Manager

Selecting "Plug-ins Manager" from the Tools menu will display the Plug-ins Manager dialog.

When this is open, you can set priority for a selected plug-in.


Functions, types and constants

Description of exported functions, types and constants

1. TPGIParamsBlock.

type
PPGIParamsBlock = ^TPGIParamsBlock;
TPGIParamsBlock = record
pMemAllocator : PMemoryAllocator; // The address of the procedure
// allocating memory. The procedure
// is required for correctly deallocating
// memory after use.

pCallBack : Pointer; // Pointer to CallBack function.
pInBuff : Pointer; // Pointer to input buffer.
pOutBuff : Pointer; // Pointer to output buffer.
// Filled by plug-in in case of successful
// execution of the function.
dwInSize : DWORD; // Size of input buffer.
dwOutSize : DWORD; // Size of output buffer.
// Filled by plug-in in case of successful
// execution of the function.
dwInterface : DWORD; // Interface ID. Read Only!
dwIndex : DWORD; // Index. (For internal use by Resource Tuner).
// Read Only!
end;

The structure that facilitates interaction with Resource Tuner.

ATTENTION! Under no circumstances should you modify the values marked as Read Only! Changing these values may adversely affect the operation of the program.

2. TMemoryAllocator.

type
PMemoryAllocator = ^TMemoryAllocator;
TMemoryAllocator = function (Size: DWORD): Pointer; stdcall;

Input : Size - DWORD
- Size of requested memory
OutPut: Pointer
- The pointer to allocated memory. In case of failure when allocating memory returns nil.

Prototype of function which allocates memory. Used only to return results to Resource Tuner. All other memory allocation should use standard library calls.

Rather than being permanently loaded into memory, the plug-in uses this function at run-time, to request a buffer of the necessary size from Resource Tuner where the plug-in can store the results of an operation. The plug-in does not need to clear the input buffer, or de-allocate the space after use, as these tasks are performed by Resource Tuner.

3. CallBack Events.

 type
PPGICallBack = ^TPGICallBack;
TPGICallBack = procedure (dwPGIID: DWORD; dwEventID: DWORD; pcMessage: PChar);
  stdcall;

const
evID_PostLogInfo = 0; // Posting data to the log. pcMessage
// contains pointer to the line containing
// description of the occurred event.

Input : None
Output: dwPGIID - DWORD
- Interface ID. This is intended to uniquely specify a particular event issued by the plug-in if several functions are executing at the same time.

IMPORTANT: ONLY the Interface ID values received from Resource Tuner should be used.

dwEventID - DWORD
- Identifier of the occurred event.

pcMessage - Pointer
- Pointer to the data that is necessary to transmit to Resource Tuner.

The prototype of the function that allows the plug-in to inform Resource Tuner about various events that have occurred at run time.

IMPORTANT: Currently, only Post data to log is supported. To maintain compatibility with future versions of Resource Tuner, use ONLY PREDEFINED EVENT TYPES.

4. PexRegisterPlugIn.

procedure PexRegisterPlugIn(var N: PChar); Export; StdCall;

The procedure called at Plug-in registration.

This should return to Resource Tuner a pointer to the line, which contains the plug-in name. Resource Tuner uses this to associate the plug-in with any menu items and events it provides.

IMPORTANT: The line should not be empty. The plug-in will not be registered if an empty line is given.

5. PexAboutPlugIn.

procedure PexAboutPlugIn; Export; StdCall;

Optional procedure.

If this procedure is present, Resource Tuner adds an entry titled "Plug-ins - About <Name>" to the menu. The name is obtained by Resource Tuner when the plug-in is registered. This menu options allows information about the plug-in to be displayed to the user.

6. PexPreloadImage.

function PexPreloadImage(pPGIPB: PPGIParamsBlock): Boolean; stdcall;

Input: - the function receives PPGIParamsBlock and uses values sent to it.
Output: - returns True if execution was successful, otherwise it returns False.

The function executed prior to beginning data processing by Resource Tuner.
This function provides a generic means to perform any startup processing. In the body of this function it is possible, for example, to place the code to unpack any packed files, and transmit them to Resource Tuner for further processing.

Examples: Pascal and C++


Basics

PE File Resource Basics

Resources are data that define the visible portions of your Windows program. Resources provide a consistent user interface that makes it easy for users to switch from one Windows program to another. A resource might be displayed in an application as error messages or as part of the user interface. Resources can contain data in a number of forms, including strings, images, dialogs, and persisted objects. In general, a Windows application's resources are separated from the program code, letting you make significant changes to the interface without recompiling your entire application.

STANDARD RESOURCES

BITMAP

MENU

ACCELERATORS

DIALOG

STRINGTABLE

DELPHI FORM

VERSIONINFO

APPLICATION MANIFEST

CONTROL CLASSES AND STYLES

CONTROL CLASSES

WINDOW STYLES

WINDOW EXTENDED STYLES

BUTTON STYLES

COMBO BOX STYLES

EDIT CONTROL STYLES

LIST BOX CONTROL STYLES

SCROLL BAR STYLES

STATIC CONTROL STYLES

DIALOG BOX STYLES

UP-DOWN CONTROL STYLES


Bitmap

Bitmap Resource

The BITMAP resource definition statement specifies a bitmap that an application uses in its screen display or as an item in a menu or control.

Syntax

nameID BITMAP [load-mem] filename

Parameters

nameID

Specifies either a unique name or a 16-bit unsigned integer value identifying the resource.

load-mem

Specifies loading and memory attributes for the resource

filename

Specifies the name of the file that contains the resource. The name must be a valid filename; it must be a full path if the file is not in the current working directory. The path can either be a quoted or nonquoted string.

Example

The following example specifies two bitmap resources:

pic1 BITMAP picture.bmp
12 BITMAP PRELOAD logo.bmp


Menu

Menu Resource

The MENU statement defines the contents of a menu resource. A menu resource is a collection of information that defines the appearance and function of an application menu. A menu is a special input tool that lets a user select commands and open submenus from a list of menu items.

Syntax

menuID MENU [load-mem]
[optional-statements]
BEGIN
item-definitions
. . .
END

Parameters

menuID

A number that identifies the menu. This value is either a unique string or a unique 16-bit unsigned integer value in the range of 1 to 65,535.

load-mem

An attribute that specifies loading and memory attributes for the resource.

optional-statements

This parameter can be zero of more of the following statements:

Statement | Description
CHARACTERISTICS dword | User-defined information about a resource that can be used by tools that read and write resource files.
LANGUAGE language, sublanguage | Specifies the language for the resource.
VERSION dword | User-defined version number for the resource that can be used by tools that read and write resource files.


Accelerator

Accelerator-Table Resource

Accelerators are closely related to menus both provide the user with access to an application's command set. Typically, users rely on an application's menus to learn the command set and then switch over to using accelerators as they become more proficient with the application. Accelerators provide faster, more direct access to commands than menus do. At a minimum, an application should provide accelerators for the more commonly used commands. Although accelerators typically generate commands that exist as menu items, they can also generate commands that have no equivalent menu items.

An ASCII character code or a virtual-key code can be used to define the accelerator. An ASCII character code makes the accelerator case sensitive. Thus, using the ASCII "C" character defines the accelerator as ALT+C rather than ALT+c. However, case-sensitive accelerators can be confusing to use. For example, the ALT+C accelerator will be generated if the CAPS LOCK key is down or if the SHIFT key is down, but not if both are down.

Typically, accelerators don't need to be case sensitive, so most applications use virtual-key codes for accelerators rather than ASCII character codes.

Avoid accelerators that conflict with an application's menu mnemonics, because the accelerator overrides the mnemonic, which can confuse the user.

An ASCII keystroke is specified either by enclosing the ASCII character in double quotation marks or by using the integer value of the character in combination with the ASCII flag. The following examples show how to define ASCII accelerators.

"A", ID_ACCEL1 ; SHIFT+A
65, ID_ACCEL2, ASCII ; SHIFT+A

A virtual-key code keystroke is specified differently depending on whether the keystroke is an alphanumeric key or a non-alphanumeric key. For an alphanumeric key, the key's letter or number, enclosed in double quotation marks, is combined with the VIRTKEY flag. For a non-alphanumeric key, the Windows virtual-key code for the specific key is combined with the VIRTKEY flag. The following examples show how to define virtual-key code accelerators.

"a", ID_ACCEL3, VIRTKEY ; A (caps-lock on) or a
VK_INSERT, ID_ACCEL4, VIRTKEY ; INSERT key

The following example shows an accelerator-table resource that defines accelerators for file operations. The name of the resource is FileAccel.

FileAccel ACCELERATORS
BEGIN
VK_F12, IDM_OPEN, CONTROL, VIRTKEY ; CTRL+F12
VK_F4, IDM_CLOSE, ALT, VIRTKEY ; ALT+F4
VK_F12, IDM_SAVE, SHIFT, VIRTKEY ; SHIFT+F12
VK_F12, IDM_SAVEAS, VIRTKEY ; F12
END

If you want the user to press the ALT, SHIFT, or CTRL keys in some combination with the accelerator keystroke, specify the ALT, SHIFT, and CONTROL flags in the accelerator's definition. Following are some examples.

"B", ID_ACCEL5, ALT ; ALT_SHIFT+B
"I", ID_ACCEL6, CONTROL, VIRTKEY ; CTRL+I
VK_F5, ID_ACCEL7, CONTROL, ALT, VIRTKEY ; CTRL+ALT+F5

By default, when an accelerator key corresponds to a menu item, Windows highlights the menu item. You can use the NOINVERT flag to prevent highlighting for an individual accelerator. The following example shows how to use the NOINVERT flag.

VK_DELETE, ID_ACCEL8, VIRTKEY, SHIFT, NOINVERT ; SHIFT+DELETE

To define accelerators that correspond to menu items in your application, include the accelerators in the text of the menu items. The following example shows how to include accelerators in menu-item text in a resource-definition file.

FilePopup MENU
BEGIN
POPUP "&File"
BEGIN
MENUITEM "&New..", IDM_NEW
MENUITEM "&Open\tCtrl+F12", IDM_OPEN
MENUITEM "&Close\tAlt+F4" IDM_CLOSE
MENUITEM "&Save\tShift+F12", IDM_SAVE
MENUITEM "Save &As...\tF12", IDM_SAVEAS
END
END

Syntax

An accelerator table consists of an array of ACCEL structures, each defining an individual accelerator. Each ACCEL structure includes the following information:

• The accelerator's keystroke combination.
• The accelerator's identifier.
• Various flags. This includes one that specifies whether the system is to provide visual feedback by highlighting the corresponding menu item, if any, when the accelerator is used.

typedef struct tagACCEL { // accl

BYTE fVirt;
WORD key;
WORD cmd;
} ACCEL;

Members

fVirt

Specifies the accelerator flags. This member can be a combination of the following values:

Value | Meaning
ALT | The ALT key must be held down when the accelerator key is pressed.
CONTROL | The CTRL key must be held down when the accelerator key is pressed.
NOINVERT | Specifies that no top-level menu item is highlighted when the accelerator is used. If this flag is not specified, a top-level menu item will be highlighted, if possible, when the accelerator is used.
SHIFT | The SHIFT key must be held down when the accelerator key is pressed.
VIRTKEY | The key member specifies a virtual-key code. If this flag is not specified, key is assumed to specify an ASCII character code.

key

Specifies the accelerator key. This member can be either a virtual-key code or an ASCII character code.

cmd

Specifies the accelerator identifier. This value is placed in the low-order word of the wParam parameter of the WM_COMMAND or WM_SYSCOMMAND message when the accelerator is pressed.


Dialog

Dialog Resource

The DIALOG statement defines a window that an application can use to create dialog boxes. The statement defines the position and dimensions of the dialog box on the screen as well as the dialog box style.

Syntax

nameID DIALOG [load-mem] x, y, width, height
[option-statements]
BEGIN
control-statement
. . .
END

Parameters

nameID

Identifies the dialog box. This is either a unique name or a unique 16-bit unsigned integer value in the range 1 to 65,535.

load-mem

Specifies loading and memory attributes for the resource.

option-statements

Specifies options for the dialog box. This can be zero or more of the following statements:

Statement | Description
CAPTION "text" | Specifies the caption of the dialog box if it has a title bar.
CHARACTERISTICS dword | Specifies a user-defined double-word value for use by resource tools. This value is not used by Windows.
CLASS class | Specifies a 16-bit unsigned integer or a string, enclosed in double quotation marks ("), that identifies the class of the dialog box.
LANGUAGE language,sublanguage | Specifies the language of the dialog box.
STYLE styles | Specifies the styles of the dialog box.
EXSTYLE extended-styles | Specifies the extended styles of the dialog box.
VERSION dword | Specifies a user-defined doubleword value. This statement is intended for use by additional resource tools and is not used by Windows.

Example

The following demonstrates the usage of the DIALOG statement:

ErrorDialog DIALOG 10, 10, 300, 110
STYLE WS_POPUP|WS_BORDER
CAPTION "Error!"
BEGIN
CTEXT "Select One:", 1, 10, 10, 280, 12
PUSHBUTTON "&Retry", 2, 75, 30, 60, 12
PUSHBUTTON "&Abort", 3, 75, 50, 60, 12
PUSHBUTTON "&Ignore", 4, 75, 80, 60, 12
END


StringTable

StringTable Resource

The STRINGTABLE statement defines one or more string resources for an application. String resources are simply null-terminated strings that can be loaded when needed from the executable file, using the LoadString function.

Syntax

STRINGTABLE [load-mem]
[optional-statements]
BEGIN
stringID string
. . .
END

Parameters

load-mem

Specifies loading and memory attributes for the resource.

optional-statements

Zero or more of the following statements:

Statement | Description
CHARACTERISTICS dword | User-defined information about a resource that can be used by tools that read and write resource files.
LANGUAGE language, sublanguage | Specifies the language for the resource.
VERSION dword | User-defined version number for the resource that can be used by tools that read and write resource files.

stringID

Specifies an unsigned 16-bit integer that identifies the resource.

string

Specifies one or more strings, enclosed in double quotation marks. The string must be no longer than 4097 characters and must occupy a single line in the source file.

Remarks

Grouping strings in separate sections allows all related strings to be read in at one time and discarded together. When possible, an application should make the table movable and discardable. RC allocates 16 strings per section and uses the identifier value to determine which section is to contain the string. Strings with the same upper-12 bits in their identifiers are placed in the same section.


DFM

Delphi Form (DFM) Resource

A DFM (Delphi Form Module) file is an ASCII file encoded by Borland® Delphi/C++ Builder. This file contains the details of the objects contained in a form (component properties, methods and descriptions as well as the hierarchy of every component used by an application and information about controls initializations). Later, during the compilation, this DFM file is linked with the executable in form of RCDATA (Application-defined) resource. Delphi does not only store automatically DFM blocks as RCDATA, but rather we will also meet with resources like DVCLAL (this stands for "Delphi Visual Component Libraray Access License") and PACKAGEINFO.

When examining a program written in Delphi/C++ Builder, Resource Tuner recognizes these resources, visualizes in text mode all the loaded DFMs of the target executable and reconsitutes them in editable form. See How to edit a Delphi form.

Example

The following demonstrates the DFM converted to text:

// <DFM> TFORM1 = class(TForm);

object Form1: TForm1
Left = 351
Top = 162
BorderIcons = [biSystemMenu, biMinimize]
BorderStyle = bsSingle
Caption = 'Test Application'
ClientHeight = 287
ClientWidth = 571
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OnCreate = FormCreate
PixelsPerInch = 96
TextHeight = 13
object Label1: TLabel
Left = 60
Top = 60
Width = 273
Height = 53
Alignment = taCenter
AutoSize = False
Caption = 'Sample Label.'
Color = cl3DLight
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -37
Font.Name = 'Courier New'
Font.Style = []
ParentColor = False
ParentFont = False
end
end


VersionInfo

VersionInfo Resource

The VERSIONINFO resource contains such information about the file as its version number, its intended operating system, and its original filename. The resource is intended to be used with the File Installation library functions.

Syntax

versionID VERSIONINFO fixed-info
BEGIN
block-statement
. . .
END

Parameters

versionID

Specifies the version-information resource identifier. This value must be 1.

fixed-info

Specifies the version information, such as the file version and the intended operating system.

block-statement

Specifies one or more version-information blocks. A block can contain string information or variable information.

langID

Specifies one of the following language codes:

Code | Language | Code | Language
0x0401 | Arabic | 0x0415 | Polish
0x0402 | Bulgarian | 0x0416 | Brazilian Portuguese
0x0403 | Catalan | 0x0417 | Rhaeto-Romanic
0x0404 | Traditional Chinese | 0x0418 | Romanian
0x0405 | Czech | 0x0419 | Russian
0x0406 | Danish | 0x041A | Croato-Serbian (Latin)
0x0407 | German | 0x041B | Slovak
0x0408 | Greek | 0x041C | Albanian
0x0409 | U.S. English | 0x041D | Swedish
0x040A | Castilian Spanish | 0x041E | Thai
0x040B | Finnish | 0x041F | Turkish
0x040C | French | 0x0420 | Urdu
0x040D | Hebrew | 0x0421 | Bahasa
0x040E | Hungarian | 0x0804 | Simplified Chinese
0x040F | Icelandic | 0x0807 | Swiss German
0x0410 | Italian | 0x0809 | U.K. English
0x0411 | Japanese | 0x080A | Mexican Spanish
0x0412 | Korean | 0x080C | Belgian French
0x0413 | Dutch | 0x0C0C | Canadian French
0x0414 | Norwegian- Bokml | 0x100C | Swiss French
0x0810 | Swiss Italian | 0x0816 | Portuguese
0x0813 | Belgian Dutch | 0x081A | Serbo-Croatian (Cyrillic)
0x0814 | Norwegian - Nynorsk |  |

charsetID

Specifies one of the following character-set identifiers:

Identifier | Character Set
0 | 7-bit ASCII
932 | Windows, Japan (Shift - JIS X-0208)
949 | Windows, Korea (Shift - KSC 5601)
950 | Windows, Taiwan (GB5)
1200 | Unicode
1250 | Windows, Latin-2 (Eastern European)
1251 | Windows, Cyrillic
1252 | Windows, Multilingual
1253 | Windows, Greek
1254 | Windows, Turkish
1255 | Windows, Hebrew
1256 | Windows, Arabic

string-name

Specifies one of the following redefined names:

Comments

Specifies additional information that should be displayed for diagnostic purposes.

CompanyName

Specifies the company that produced the file, for example, ”Microsoft Corporation”. This string is required.

FileDescription

Specifies a file description to be presented to users. This string may be displayed in a list box when the user is choosing files to install, for example, "Microsoft Word for Windows”. This string is required.

FileVersion

Specifies the version number of the file, for example, ”5.10” or ”3.00.RC1”. This string is required.

InternalName

Specifies the internal name of the file, if one exists, for example, a module name if the file is a dynamic-link library. If the file has no internal name, this string should be the original filename, without extension. This string is required.

LegalCopyright

Specifies all copyright notices that apply to the file. This should include the full text of all notices, legal symbols, copyright dates, and so on, for example, ”Copyright© Microsoft Corporation 1990-2002”. This string is optional.

LegalTrademarks

Specifies all trademarks and registered trademarks that apply to the file. This should include the full text of all notices, legal symbols, trademark numbers, and so on, for example, ”Windows™ is a trademark of Microsoft® Corporation”. This string is optional.

OriginalFilename

Specifies the original name of the file, not including a path. This information enables an application to determine whether a file has been renamed by a user. The format of the name depends on the file system for which the file was created. This string is required.

PrivateBuild

Specifies information about a private version of the file, for example, ”Built by TESTER1 on \TESTBED”. This string should be present only if the VS_FF_PRIVATEBUILD flag is set in the dwFileFlags member of the VS_FIXEDFILEINFO structure of the root block.

ProductName

Specifies the name of the product with which the file is distributed, for example, ”Microsoft Windows”. This string is required.

ProductVersion

Specifies the version of the product with which the file is distributed, for example, ”5.10” or ”3.00.RC1”. This string is required.

SpecialBuild

Specifies how this version of the file differs from the standard version¾for example, ”Private build for TESTER1 solving mouse problems on M250 and M250E computers”. This string should be present only if the VS_FF_SPECIALBUILD flag is set in the dwFileFlags member of the VS_FIXEDFILEINFO structure in the root block.

A string information block has the following form:

BLOCK "StringFileInfo"
BEGIN
BLOCK "lang-charset"
BEGIN
VALUE "string-name", "value"
. . .
END
END

Following are the parameters in the StringFileInfo block:

lang-charset

Specifies a language and character-set identifier pair. It is a hexadecimal string consisting of the concatenation of the language and character-set identifiers listed earlier in this section.

string-name

Specifies the name of a value in the block and can be one of the redefined names listed earlier in this section.

value

Specifies, as a character string, the value of the corresponding string name. More than one VALUE statement can be given.

A variable information block has the following form:

BLOCK "VarFileInfo"
BEGIN
VALUE "Translation",
langID, charsetID
. . .
END

Following are the parameters in the variable information block:

langID

Specifies one of the language identifiers listed earlier in this section.

charsetID

Specifies one of the character-set identifiers listed earlier in this section. More than one identifier pair can be given, but each pair must be separated from the preceding pair with a comma.


Application Manifest

Application Manifest Resource

An Application Manifest is an XML file that describes and identifies the shared and private side-by-side assemblies that an application should bind to at run time. More detailed information can be found on the [image] Microsoft MSDN site.

The following is an example of an application manifest for an application named MySampleApp.exe. The application consumes the Common Controls side-by-side assembly (COMCTL32).

<?xml version="1.0"
encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <assemblyIdentity type="win32"
                    name="myOrganization.myDivision.mySampleApp"
                    version="6.0.0.0"
                    processorArchitecture="x86"
                    publicKeyToken="6595b64144ccf1df"
  />
  <description>Your app description here</description>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type="win32"
                        name="Microsoft.Windows.Common-Controls"
                        version="6.0.0.0"
                        processorArchitecture="X86"
                        publicKeyToken="6595b64144ccf1df"
                        language="*"
      />
    </dependentAssembly>
  </dependency>
</assembly>

Elements

Names of elements and attributes are case-sensitive. The values of elements and attributes are case-insensitive, except for the value of the type attribute.

assembly

A container element. Its first subelement must be a noInherit or assemblyIdentity element. Required.

The assembly element has the following attributes.
Attribute | Description
manifestVersion | The manifestVersion attribute must be set to 1.0.

noInherit

Include this element in an application manifest to set the activation contexts generated from the manifest with the "no inherit" flag. When this flag is not set in an activation context, and the activation context is active, it is inherited by new threads in the same process, windows, window procedures, and Asynchronous Procedure Calls. Setting this flag prevents the new object from inheriting the active context.

The noInherit element is optional and typically omitted. Most assemblies do not work correctly using a no-inherit activation context because the assembly must be explicitly designed to manage the propagation of their own activation context. The use of the noInherit element requires that any dependent assemblies referenced by the application manifest have a noInheritable element in their assembly manifest.

If noInherit is used in a manifest, it must be the first subelement of the assembly element. The assemblyIdentity element should come immediately after the noInherit element. If noInherit is not used, assemblyIdentity must be the first subelement of the assembly element. The noInherit element has no child elements. It is not a valid element in assembly manifests.

assemblyIdentity

As the first subelement of an assembly element, assemblyIdentity describes and uniquely identifies the application owning this application manifest. As the first subelement of a dependentAssembly element, assemblyIdentity describes a side-by-side assembly required by the application. Note that every assembly referenced in the application manifest requires an assemblyidentity that exactly matches the assemblyIdentity in the referenced assembly's own assembly manifest.

The element has the following attributes. It has no subelements.

Attribute

Description

type

Specifies the application or assembly type. The value must be win32 and all in lower case. Required.

name

Uniquely names the application or assembly. Use the following format for the name: Organization.Division.Name. For example Microsoft.Windows.mysampleApp. Required.

language

Identifies the language of the application or assembly. Optional. If the application or assembly is language-specific, specify the DHTML language code.

In the assemblyIdentity of an application intended for worldwide use (language neutral) omit the language attribute.

In an assemblyIdentity of an assembly intended for worldwide use (language neutral) set the value of language to "*".

processorArchitecture

Specifies the processor. The valid values are x86 for 32-bit Windows and IA-64 for 64-bit Windows. Optional.

version

Specifies the application or assembly version. Use the four-part version format: mmmmm.nnnnn.ooooo.ppppp. Each of the parts separated by periods can be 0-65535 inclusive. Required.

publicKeyToken

A 16-character hexadecimal string representing the last 8 bytes of the SHA-1 hash of the public key under which the application or assembly is signed. The public key used to sign the catalog must be 2048 bits or greater. Required for all shared side-by-side assemblies.

dependency

Contains at least one dependentAssembly. It has no attributes. Optional.

dependentAssembly

The first subelement of dependentAssembly must be an assemblyIdentity element that describes a side-by-side assembly required by the application. Every dependentAssembly must be inside exactly one dependency. It has no attributes.

file

Specifies files that are private to the application. Optional.

The element has the attributes shown in the following table.

Attribute

Description

name

Name of the file. For example, Comctl32.dll.

hashalg

Algorithm used to create a hash of the file. This value should be SHA1.

hash

A hash of the file referred to by name. A hexadecimal string of length depending on the hash algorithm.


Control classes

PREDEFINED CONTROL CLASSES

The following predefined control classes can be specified in the lpClassName parameter:

Class | Meaning
BUTTON | Designates a small rectangular child window that represents a button the user can click to turn it on or off. Button controls can be used alone or in groups, and they can either be labeled or appear without text. Button controls typically change appearance when the user clicks them.
COMBOBOX | Designates a control consisting of a list box and a selection field similar to an edit control. When using this style, an application should either display the list box at all times or enable a drop-down list box. Depending on the style of the combo box, the user can or cannot edit the contents of the selection field. If the list box is visible, typing characters into the selection field highlights the first list box entry that matches the characters typed. Conversely, selecting an item in the list box displays the selected text in the selection field.
EDIT | Designates a rectangular child window into which the user can type text from the keyboard. The user selects the control and gives it the keyboard focus by clicking it or moving to it by pressing the TAB key. The user can type text when the edit control displays a flashing caret; use the mouse to move the cursor, select characters to be replaced, or position the cursor for inserting characters; or use the BACKSPACE key to delete characters. Edit controls use the variable-pitch system font and display characters from the ANSI character set. The WM_SETFONT message can also be sent to the edit control to change the default font. Edit controls expand tab characters into as many space characters as are required to move the caret to the next tab stop. Tab stops are assumed to be at every eighth character position.
LISTBOX | Designates a list of character strings. Specify this control whenever an application must present a list of names, such as filenames, from which the user can choose. The user can select a string by clicking it. A selected string is highlighted, and a notification message is passed to the parent window. Use a vertical or horizontal scroll bar with a list box to scroll lists that are too long for the control window. The list box automatically hides or shows the scroll bar, as needed.
SCROLLBAR | Designates a rectangle that contains a scroll box and has direction arrows at both ends. The scroll bar sends a notification message to its parent window whenever the user clicks the control. The parent window is responsible for updating the position of the scroll box, if necessary. Scroll bar controls have the same appearance and function as scroll bars used in ordinary windows. Unlike scroll bars, however, scroll bar controls can be positioned anywhere in a window for use whenever scrolling input is needed for a window. The scroll bar class also includes size box controls. A size box is a small rectangle the user can expand to change the size of the window.
STATIC | Designates a simple text field, box, or rectangle used to label, box, or separate other controls. Static controls take no input and provide no output.


Window styles

WINDOW STYLES

The following window styles can be specified in the Style parameter:

WS_BORDER Creates a window that has a thin-line border.

WS_CAPTION Creates a window that has a title bar (includes the WS_BORDER style).

WS_CHILD Creates a child window. This style cannot be used with the WS_POPUP style.

WS_CHILDWINDOW Same as the WS_CHILD style.

WS_CLIPCHILDREN Excludes the area occupied by child windows when drawing occurs within the parent window. This style is used when creating the parent window.

WS_CLIPSIBLINGS Clips child windows relative to each other; that is, when a particular child window receives a WM_PAINT message, the WS_CLIPSIBLINGS style clips all other overlapping child windows out of the region of the child window to be updated. If WS_CLIPSIBLINGS is not specified and child windows overlap, it is possible, when drawing within the client area of a child window, to draw within the client area of a neighboring child window.

WS_DISABLED Creates a window that is initially disabled. A disabled window cannot receive input from the user.

WS_DLGFRAME Creates a window that has a border of a style typically used with dialog boxes. A window with this style cannot have a title bar.

WS_GROUP Specifies the first control of a group of controls. The group consists of this first control and all controls defined after it, up to the next control with the WS_GROUP style. The first control in each group usually has the WS_TABSTOP style so that the user can move from group to group. The user can subsequently change the keyboard focus from one control in the group to the next control in the group by using the direction keys.

WS_HSCROLL Creates a window that has a horizontal scroll bar.

WS_ICONIC Creates a window that is initially minimized. Same as the WS_MINIMIZE style.

WS_MAXIMIZE Creates a window that is initially maximized.

WS_MAXIMIZEBOX Creates a window that has a Maximize button. Cannot be combined with the WS_EX_CONTEXTHELP style. The WS_SYSMENU style must also be specified.

WS_MINIMIZE Creates a window that is initially minimized. Same as the WS_ICONIC style.

WS_MINIMIZEBOX Creates a window that has a Minimize button. Cannot be combined with the WS_EX_CONTEXTHELP style. The WS_SYSMENU style must also be specified.

WS_OVERLAPPED Creates an overlapped window. An overlapped window has a title bar and a border. Same as the WS_TILED style.

WS_OVERLAPPEDWINDOW Creates an overlapped window with the WS_OVERLAPPED, WS_CAPTION, WS_SYSMENU, WS_THICKFRAME, WS_MINIMIZEBOX, and WS_MAXIMIZEBOX styles. Same as the WS_TILEDWINDOW style.

WS_POPUP Creates a pop-up window. This style cannot be used with the WS_CHILD style.

WS_POPUPWINDOW Creates a pop-up window with WS_BORDER, WS_POPUP, and WS_SYSMENU styles. The WS_CAPTION and WS_POPUPWINDOW styles must be combined to make the window menu visible.

WS_SIZEBOX Creates a window that has a sizing border. Same as the WS_THICKFRAME style.

WS_SYSMENU Creates a window that has a window-menu on its title bar. The WS_CAPTION style must also be specified.

WS_TABSTOP Specifies a control that can receive the keyboard focus when the user presses the TAB key. Pressing the TAB key changes the keyboard focus to the next control with the WS_TABSTOP style.

WS_THICKFRAME Creates a window that has a sizing border. Same as the WS_SIZEBOX style.

WS_TILED Creates an overlapped window. An overlapped window has a title bar and a border. Same as the WS_OVERLAPPED style.

WS_TILEDWINDOW Creates an overlapped window with the WS_OVERLAPPED, WS_CAPTION, WS_SYSMENU, WS_THICKFRAME, WS_MINIMIZEBOX, and WS_MAXIMIZEBOX styles. Same as the WS_OVERLAPPEDWINDOW style.

WS_VISIBLE Creates a window that is initially visible.

WS_VSCROLL Creates a window that has a vertical scroll bar.


Window extended styles

WINDOW EXTENDED STYLES

This parameter can be one of the following values:

WS_EX_ACCEPTFILES Specifies that a window created with this style accepts drag-drop files.

WS_EX_APPWINDOW Forces a top-level window onto the taskbar when the window is minimized.

WS_EX_CLIENTEDGE Specifies that a window has a border with a sunken edge.

WS_EX_CONTEXTHELP Includes a question mark in the title bar of the window. When the user clicks the question mark, the cursor changes to a question mark with a pointer. If the user then clicks a child window, the child receives a WM_HELP message. The child window should pass the message to the parent window procedure, which should call the WinHelp function using the HELP_WM_HELP command. The Help application displays a pop-up window that typically contains help for the child window.

WS_EX_CONTEXTHELP cannot be used with the WS_MAXIMIZEBOX or WS_MINIMIZEBOX styles.

WS_EX_CONTROLPARENT Allows the user to navigate among the child windows of the window by using the TAB key.

WS_EX_DLGMODALFRAME Creates a window that has a double border; the window can, optionally, be created with a title bar by specifying the WS_CAPTION style in the Style parameter.

WS_EX_LAYERED Windows 2000 or later: Creates a layered window. Note that this cannot be used for child windows. Also, this cannot be used if the window has a class style of either CS_OWNDC or CS_CLASSDC.

WS_EX_LAYOUTRTL Windows 2000 and the Arabic and Hebrew versions of Windows 98 and Windows Me: Creates a window whose horizontal origin is on the right edge. Increasing horizontal values advance to the left.

WS_EX_LEFT Window has generic "left-aligned" properties. This is the default.

WS_EX_LEFTSCROLLBAR If the shell language is Hebrew, Arabic, or another language that supports reading order alignment, the vertical scroll bar (if present) is to the left of the client area. For other languages, the style is ignored and not treated as an error.

WS_EX_LTRREADING The window text is displayed using Left to Right reading-order properties. This is the default.

WS_EX_MDICHILD Creates an MDI child window.

WS_EX_NOACTIVATE Windows 2000 or later: A top-level window created with this style does not become the foreground window when the user clicks it. The system does not bring this window to the foreground when the user minimizes or closes the foreground window. To activate the window, use the SetActiveWindow or SetForegroundWindow function. The window does not appear on the taskbar by default. To force the window to appear on the taskbar, use the WS_EX_APPWINDOW style.

WS_EX_NOINHERITLAYOUT Windows 2000 or later: A window created with this style does not pass its window layout to its child windows.

WS_EX_NOPARENTNOTIFY Specifies that a child window created with this style does not send the WM_PARENTNOTIFY message to its parent window when it is created or destroyed.

WS_EX_OVERLAPPEDWINDOW Combines the WS_EX_CLIENTEDGE and WS_EX_WINDOWEDGE styles.

WS_EX_PALETTEWINDOW Combines the WS_EX_WINDOWEDGE, WS_EX_TOOLWINDOW, and WS_EX_TOPMOST styles.

WS_EX_RIGHT Window has generic "right-aligned" properties. This depends on the window class. This style has an effect only if the shell language is Hebrew, Arabic, or another language that supports reading order alignment; otherwise, the style is ignored and not treated as an error.

WS_EX_RIGHTSCROLLBAR Vertical scroll bar (if present) is to the right of the client area. This is the default.

WS_EX_RTLREADING If the shell language is Hebrew, Arabic, or another language that supports reading order alignment, the window text is displayed using Right to Left reading-order properties. For other languages, the style is ignored and not treated as an error.

WS_EX_STATICEDGE Creates a window with a three-dimensional border style intended to be used for items that do not accept user input.

WS_EX_TOOLWINDOW Creates a tool window; that is, a window intended to be used as a floating toolbar. A tool window has a title bar that is shorter than a normal title bar, and the window title is drawn using a smaller font. A tool window does not appear in the taskbar or in the dialog that appears when the user presses ALT+TAB.

WS_EX_TOPMOST Specifies that a window created with this style should be placed above all non-topmost windows and should stay above them, even when the window is deactivated. To add or remove this style, use the SetWindowPos function.

WS_EX_TRANSPARENT Specifies that a window created with this style is to be transparent. That is, any windows that are beneath the window are not obscured by the window. A window created with this style receives WM_PAINT messages only after all sibling windows beneath it have been updated.

WS_EX_WINDOWEDGE Specifies that a window has a border with a raised edge.

Using the WS_EX_RIGHT style for static or edit controls has the same effect as using the SS_RIGHT or ES_RIGHT style, respectively. Using this style with button controls has the same effect as using BS_RIGHT and BS_RIGHTBUTTON styles.


Button styles

BUTTON STYLES

The following button styles (in the BUTTON class) can be specified in the Style parameter:

BS_3STATE Creates a button that is the same as a check box, except that the box can be grayed as well as checked or unchecked. Use the grayed state to show that the state of the check box is not determined.

BS_AUTO3STATE Creates a button that is the same as a three-state check box, except that the box changes its state when the user selects it. The state cycles through checked, grayed, and unchecked. BS_AUTOCHECKBOX Creates a button that is the same as a check box, except that the check state automatically toggles between checked and unchecked each time the user selects the check box.

BS_AUTORADIOBUTTON Creates a button that is the same as a radio button, except that when the user selects it, Windows automatically sets the button's check state to checked and automatically sets the check state for all other buttons in the same group to unchecked.

BS_CHECKBOX Creates a small, empty check box with text. By default, the text is displayed to the right of the check box. To display the text to the left of the check box, combine this flag with the BS_LEFTTEXT style (or with the equivalent BS_RIGHTBUTTON style).

BS_DEFPUSHBUTTON Creates a push button that behaves like a BS_PUSHBUTTON style button, but also has a heavy black border. If the button is in a dialog box, the user can select the button by pressing the ENTER key, even when the button does not have the input focus. This style is useful for enabling the user to quickly select the most likely (default) option. BS_GROUPBOX Creates a rectangle in which other controls can be grouped. Any text associated with this style is displayed in the rectangle's upper left corner.

BS_LEFTTEXT Places text on the left side of the radio button or check box when combined with a radio button or check box style. Same as the BS_RIGHTBUTTON style.

BS_OWNERDRAW Creates an owner-drawn button. The owner window receives a WM_MEASUREITEM message when the button is created and a WM_DRAWITEM message when a visual aspect of the button has changed. Do not combine the BS_OWNERDRAW style with any other button styles.

BS_PUSHBUTTON Creates a push button that posts a WM_COMMAND message to the owner window when the user selects the button.

BS_RADIOBUTTON Creates a small circle with text. By default, the text is displayed to the right of the circle. To display the text to the left of the circle, combine this flag with the BS_LEFTTEXT style (or with the equivalent BS_RIGHTBUTTON style). Use radio buttons for groups of related, but mutually exclusive choices.

BS_BITMAP Specifies that the button displays a bitmap.

BS_BOTTOM Places text at the bottom of the button rectangle.

BS_CENTER Centers text horizontally in the button rectangle.

BS_ICON Specifies that the button displays an icon.

BS_LEFT Left-justifies the text in the button rectangle. However, if the button is a check box or radio button that does not have the BS_RIGHTBUTTON style, the text is left justified on the right side of the check box or radio button.

BS_MULTILINE Wraps the button text to multiple lines if the text string is too long to fit on a single line in the button rectangle.

BS_NOTIFY Enables a button to send BN_DBLCLK, BN_KILLFOCUS, and BN_SETFOCUS notification messages to its parent window. Note that buttons send the BN_CLICKED notification message regardless of whether it has this style.

BS_PUSHLIKE Makes a button (such as a check box, three-state check box, or radio button) look and act like a push button. The button looks raised when it isn't pushed or checked, and sunken when it is pushed or checked.

BS_RIGHT Right-justifies text in the button rectangle. However, if the button is a check box or radio button that does not have the BS_RIGHTBUTTON style, the text is right justified on the right side of the check box or radio button.

BS_RIGHTBUTTON Positions a radio button's circle or a check box's square on the right side of the button rectangle. Same as the BS_LEFTTEXT style.

BS_TEXT Specifies that the button displays text.

BS_TOP Places text at the top of the button rectangle.

BS_VCENTER Places text in the middle (vertically) of the button rectangle.


Combo box styles

COMBO BOX STYLES

The following combo box styles (in the COMBOBOX class) can be specified in the Style parameter:

CBS_AUTOHSCROLL Automatically scrolls the text in an edit control to the right when the user types a character at the end of the line. If this style is not set, only text that fits within the rectangular boundary is allowed. CBS_DISABLENOSCROLL Shows a disabled vertical scroll bar in the list box when the box does not contain enough items to scroll. Without this style, the scroll bar is hidden when the list box does not contain enough items. CBS_DROPDOWN Similar to CBS_SIMPLE, except that the list box is not displayed unless the user selects an icon next to the edit control.

CBS_DROPDOWNLIST Similar to CBS_DROPDOWN, except that the edit control is replaced by a static text item that displays the current selection in the list box.

CBS_HASSTRINGS Specifies that an owner-drawn combo box contains items consisting of strings. The combo box maintains the memory and address for the strings, so the application can use the CB_GETLBTEXT message to retrieve the text for a particular item.

CBS_LOWERCASE Converts to lowercase any uppercase characters entered into the edit control of a combo box. CBS_NOINTEGRALHEIGHT Specifies that the size of the combo box is exactly the size specified by the application when it created the combo box. Normally, Windows sizes a combo box so that it does not display partial items. CBS_OEMCONVERT Converts text entered in the combo box edit control. The text is converted from the Windows character set to the OEM character set and then back to the Windows set. This ensures proper character conversion when the application calls the CharToOem function to convert a Windows string in the combo box to OEM characters. This style is most useful for combo boxes that contain filenames and applies only to combo boxes created with the CBS_SIMPLE or CBS_DROPDOWN style.

CBS_OWNERDRAWFIXED Specifies that the owner of the list box is responsible for drawing its contents and that the items in the list box are all the same height. The owner window receives a WM_MEASUREITEM message when the combo box is created and a WM_DRAWITEM message when a visual aspect of the combo box has changed.

CBS_OWNERDRAWVARIABLE Specifies that the owner of the list box is responsible for drawing its contents and that the items in the list box are variable in height. The owner window receives a WM_MEASUREITEM message for each item in the combo box when you create the combo box; the owner window receives a WM_DRAWITEM message when a visual aspect of the combo box has changed.

CBS_SIMPLE Displays the list box at all times. The current selection in the list box is displayed in the edit control.

CBS_SORT Automatically sorts strings entered into the list box.

CBS_UPPERCASE Converts to uppercase any lowercase characters entered into the edit control of a combo box.


Edit control styles

EDIT CONTROL STYLES

The following edit control styles (in the EDIT class) can be specified in the Style parameter:

ES_AUTOHSCROLL Automatically scrolls text to the right by 10 characters when the user types a character at the end of the line. When the user presses the ENTER key, the control scrolls all text back to position zero.

ES_AUTOVSCROLL Automatically scrolls text up one page when the user presses the ENTER key on the last line.

ES_CENTER Centers text in a multiline edit control.

ES_LEFT Left-aligns text.

ES_LOWERCASE Converts all characters to lowercase as they are typed into the edit control.

ES_MULTILINE Designates a multiline edit control. The default is single-line edit control. When the multiline edit control is in a dialog box, the default response to pressing the ENTER key is to activate the default button. To use the ENTER key as a carriage return, use the ES_WANTRETURN style. When the multiline edit control is not in a dialog box and the ES_AUTOVSCROLL style is specified, the edit control shows as many lines as possible and scrolls vertically when the user presses the ENTER key. If you do not specify ES_AUTOVSCROLL, the edit control shows as many lines as possible and beeps if the user presses the ENTER key when no more lines can be displayed. If you specify the ES_AUTOHSCROLL style, the multiline edit control automatically scrolls horizontally when the caret goes past the right edge of the control. To start a new line, the user must press the ENTER key. If you do not specify ES_AUTOHSCROLL, the control automatically wraps words to the beginning of the next line when necessary. A new line is also started if the user presses the ENTER key. The window size determines the position of the word wrap. If the window size changes, the word wrapping position changes and the text is redisplayed. Multiline edit controls can have scroll bars. An edit control with scroll bars processes its own scroll bar messages. Note that edit controls without scroll bars scroll as described in the previous paragraphs and process any scroll messages sent by the parent window.

ES_NOHIDESEL Negates the default behavior for an edit control. The default behavior hides the selection when the control loses the input focus and inverts the selection when the control receives the input focus. If you specify ES_NOHIDESEL, the selected text is inverted, even if the control does not have the focus.

ES_NUMBER Allows only digits to be entered into the edit control.

ES_OEMCONVERT Converts text entered in the edit control. The text is converted from the Windows character set to the OEM character set and then back to the Windows set. This ensures proper character conversion when the application calls the CharToOem function to convert a Windows string in the edit control to OEM characters. This style is most useful for edit controls that contain filenames.

ES_PASSWORD Displays an asterisk (*) for each character typed into the edit control. You can use the EM_SETPASSWORDCHAR message to change the character that is displayed.

ES_READONLY Prevents the user from typing or editing text in the edit control.

ES_RIGHT Right-aligns text in a multiline edit control.

ES_UPPERCASE Converts all characters to uppercase as they are typed into the edit control.

ES_WANTRETURN Specifies that a carriage return be inserted when the user presses the ENTER key while entering text into a multiline edit control in a dialog box. If you do not specify this style, pressing the ENTER key has the same effect as pressing the dialog box's default push button. This style has no effect on a single-line edit control.


List box control styles

LIST BOX CONTROL STYLES

The following list box control styles (in the LISTBOX class) can be specified in the Style parameter:

LBS_DISABLENOSCROLL Shows a disabled vertical scroll bar for the list box when the box does not contain enough items to scroll. If you do not specify this style, the scroll bar is hidden when the list box does not contain enough items.

LBS_EXTENDEDSEL Allows multiple items to be selected by using the SHIFT key and the mouse or special key combinations.

LBS_HASSTRINGS Specifies that a list box contains items consisting of strings. The list box maintains the memory and addresses for the strings so the application can use the LB_GETTEXT message to retrieve the text for a particular item. By default, all list boxes except owner-drawn list boxes have this style. You can create an owner-drawn list box either with or without this style.

LBS_MULTICOLUMN Specifies a multicolumn list box that is scrolled horizontally. The LB_SETCOLUMNWIDTH message sets the width of the columns.

LBS_MULTIPLESEL Turns string selection on or off each time the user clicks or double-clicks a string in the list box. The user can select any number of strings.

LBS_NODATA Specifies a no-data list box. Specify this style when the count of items in the list box will exceed one thousand. A no-data list box must also have the LBS_OWNERDRAWFIXED style, but must not have the LBS_SORT or LBS_HASSTRINGS style. A no-data list box resembles an owner-drawn list box except that it contains no string or bitmap data for an item. Commands to add, insert, or delete an item always ignore any given item data; requests to find a string within the list box always fail. Windows sends the WM_DRAWITEM message to the owner window when an item must be drawn. The itemID member of the DRAWITEMSTRUCT structure passed with the WM_DRAWITEM message specifies the line number of the item to be drawn. A no-data list box does not send a WM_DELETEITEM message.

LBS_NOINTEGRALHEIGHT Specifies that the size of the list box is exactly the size specified by the application when it created the list box. Normally, Windows sizes a list box so that the list box does not display partial items.

LBS_NOREDRAW Specifies that the list box's appearance is not updated when changes are made. You can change this style at any time by sending a WM_SETREDRAW message.

LBS_NOSEL Specifies that the list box contains items that can be viewed but not selected.

LBS_NOTIFY Notifies the parent window with an input message whenever the user clicks or double-clicks a string in the list box.

LBS_OWNERDRAWFIXED Specifies that the owner of the list box is responsible for drawing its contents and that the items in the list box are the same height. The owner window receives a WM_MEASUREITEM message when the list box is created and a WM_DRAWITEM message when a visual aspect of the list box has changed.

LBS_OWNERDRAWVARIABLE Specifies that the owner of the list box is responsible for drawing its contents and that the items in the list box are variable in height. The owner window receives a WM_MEASUREITEM message for each item in the combo box when the combo box is created and a WM_DRAWITEM message when a visual aspect of the combo box has changed.

LBS_SORT Sorts strings in the list box alphabetically.

LBS_STANDARD Sorts strings in the list box alphabetically. The parent window receives an input message whenever the user clicks or double-clicks a string. The list box has borders on all sides.

LBS_USETABSTOPS Enables a list box to recognize and expand tab characters when drawing its strings. The default tab positions are 32 dialog box units. A dialog box unit is a horizontal or vertical distance. One horizontal dialog box unit is equal to one-fourth of the current dialog box base-width unit. Windows calculates these units based on the height and width of the current system font. The GetDialogBaseUnits function returns the current dialog box base units in pixels.

LBS_WANTKEYBOARDINPUT Specifies that the owner of the list box receives WM_VKEYTOITEM messages whenever the user presses a key and the list box has the input focus. This enables an application to perform special processing on the keyboard input.


Scroll bar styles

SCROLL BAR STYLES

The following scroll bar styles (in the SCROLLBAR class) can be specified in the Style parameter:

SBS_BOTTOMALIGN Aligns the bottom edge of the scroll bar with the bottom edge of the rectangle defined by the parameters x, y, nWidth, and nHeight. The scroll bar has the default height for system scroll bars. Use this style with the SBS_HORZ style.

SBS_HORZ Designates a horizontal scroll bar. If neither the SBS_BOTTOMALIGN nor SBS_TOPALIGN style is specified, the scroll bar has the height, width, and position defined by x, y, nWidth, and nHeight.

SBS_LEFTALIGN Aligns the left edge of the scroll bar with the left edge of the rectangle defined by the parameters x, y, nWidth, and nHeight. The scroll bar has the default width for system scroll bars. Use this style with the SBS_VERT style.

SBS_RIGHTALIGN Aligns the right edge of the scroll bar with the right edge of the rectangle defined by the parameters x, y, nWidth, and nHeight. The scroll bar has the default width for system scroll bars. Use this style with the SBS_VERT style.

SBS_SIZEBOX Designates a size box. If you specify neither the SBS_SIZEBOXBOTTOMRIGHTALIGN nor the SBS_SIZEBOXTOPLEFTALIGN style, the size box has the height, width, and position specified by the parameters x, y, nWidth, and nHeight.

SBS_SIZEBOXBOTTOMRIGHTALIGN Aligns the lower-right corner of the size box with the lower-right corner of the rectangle specified by the parameters x, y, nWidth, and nHeight. The size box has the default size for system size boxes. Use this style with the SBS_SIZEBOX style.

SBS_SIZEBOXTOPLEFTALIGN Aligns the upper-left corner of the size box with the upper-left corner of the rectangle specified by the parameters x, y, nWidth, and nHeight. The size box has the default size for system size boxes. Use this style with the SBS_SIZEBOX style.

SBS_SIZEGRIP Same as SBS_SIZEBOX, but with a raised edge.

SBS_TOPALIGN Aligns the top edge of the scroll bar with the top edge of the rectangle defined by the parameters x, y, nWidth, and nHeight. The scroll bar has the default height for system scroll bars. Use this style with the SBS_HORZ style.

SBS_VERT Designates a vertical scroll bar. If you specify neither the SBS_RIGHTALIGN nor the SBS_LEFTALIGN style, the scroll bar has the height, width, and position specified by the parameters x, y, nWidth, and nHeight.


Static control styles

STATIC CONTROL STYLES

The following scroll bar styles (in the SCROLLBAR class) can be specified in the Style parameter:

SS_BITMAP Specifies a bitmap is to be displayed in the static control. The error code text is the name of a bitmap (not a filename) defined elsewhere in the resource file. The style ignores the nWidth and nHeight parameters; the control automatically sizes itself to accommodate the bitmap.

SS_BLACKFRAME Specifies a box with a frame drawn in the same color as the window frames. This color is black in the default Windows color scheme.

SS_BLACKRECT Specifies a rectangle filled with the current window frame color. This color is black in the default Windows color scheme.

SS_CENTER Specifies a simple rectangle and centers the error code text in the rectangle. The text is formatted before it is displayed. Words that extend past the end of a line are automatically wrapped to the beginning of the next centered line.

SS_CENTERIMAGE Specifies that the midpoint of a static control with the SS_BITMAP or SS_ICON style is to remain fixed when the control is resized. The four sides are adjusted to accommodate a new bitmap or icon.If a static control has the SS_BITMAP style and the bitmap is smaller than the control's client area, the client area is filled with the color of the pixel in the upper-left corner of the bitmap. If a static control has the SS_ICON style, the icon does not appear to paint the client area.

SS_GRAYFRAME Specifies a box with a frame drawn with the same color as the screen background (desktop). This color is gray in the default Windows color scheme.

SS_GRAYRECT Specifies a rectangle filled with the current screen background color. This color is gray in the default Windows color scheme.

SS_ICON Specifies an icon displayed in the dialog box. The given text is the name of an icon (not a filename) defined elsewhere in the resource file. The style ignores the nWidth and nHeight parameters; the icon automatically sizes itself.

SS_LEFT Specifies a simple rectangle and left-aligns the given text in the rectangle. The text is formatted before it is displayed. Words that extend past the end of a line are automatically wrapped to the beginning of the next left-aligned line.

SS_LEFTNOWORDWRAP Specifies a simple rectangle and left-aligns the given text in the rectangle. Tabs are expanded but words are not wrapped. Text that extends past the end of a line is clipped.

SS_METAPICT Specifies a metafile picture is to be displayed in the static control. The given text is the name of a metafile picture (not a filename) defined elsewhere in the resource file. A metafile static control has a fixed size; the metafile picture is scaled to fit the static control's client area.

SS_NOPREFIX Prevents interpretation of any ampersand (&) characters in the control's text as accelerator prefix characters. These are displayed with the ampersand removed and the next character in the string underlined. This static control style may be included with any of the defined static controls. An application can combine SS_NOPREFIX with other styles by using the bitwise OR (|) operator. This can be useful when filenames or other strings that may contain an ampersand (&) must be displayed in a static control in a dialog box.

SS_NOTIFY Sends the parent window STN_CLICKED and STN_DBLCLK notification messages when the user clicks or double clicks the control.

SS_RIGHT Specifies a simple rectangle and right-aligns the given text in the rectangle. The text is formatted before it is displayed. Words that extend past the end of a line are automatically wrapped to the beginning of the next right-aligned line.

SS_RIGHTIMAGE Specifies that the bottom-right corner of a static control with the SS_BITMAP or SS_ICON style is to remain fixed when the control is resized. Only the top and left sides are adjusted to accommodate a new bitmap or icon.

SS_SIMPLE Specifies a simple rectangle and displays a single line of left-aligned text in the rectangle. The text line cannot be shortened or altered in any way. The control's parent window or dialog box must not process the WM_CTLCOLORSTATIC message.

SS_WHITEFRAME Specifies a box with a frame drawn with the same color as the window backgrounds. This color is white in the default Windows color scheme.

SS_WHITERECT Specifies a rectangle filled with the current window background color. This color is white in the default Windows color scheme.


Dialog box styles

DIALOG BOX STYLES

The following dialog box styles can be specified in the Style parameter:

DS_3DLOOK Gives the dialog box a nonbold font and draws three-dimensional borders around control windows in the dialog box.The DS_3DLOOK style is required only by Win32-based applications compiled for versions of Windows earlier than Windows 95 or Windows NT 4.0. The system automatically applies the three-dimensional look to dialog boxes created by applications compiled for current versions of Windows.

DS_ABSALIGN Indicates that the coordinates of the dialog box are screen coordinates; otherwise, Windows assumes they are client coordinates.

DS_CENTER Centers the dialog box in the working area; that is, the area not obscured by the tray.

DS_CENTERMOUSE Centers the mouse cursor in the dialog box.

DS_CONTEXTHELP Includes a question mark in the title bar of the dialog box. When the user clicks the question mark, the cursor changes to a question mark with a pointer. If the user then clicks a control in the dialog box, the control receives a WM_HELP message. The control should pass the message to the dialog procedure, which should call the WinHelp function using the HELP_WM_HELP command. The Help application displays a pop-up window that typically contains help for the control.Note that

DS_CONTEXTHELP is just a placeholder. When the dialog box is created, the system checks for DS_CONTEXTHELP and, if it is there, adds WS_EX_CONTEXTHELP to the extended style of the dialog box. WS_EX_CONTEXTHELP cannot be used with the WS_MAXIMIZEBOX or WS_MINIMIZEBOX styles.

DS_CONTROL Creates a dialog box that works well as a child window of another dialog box, much like a page in a property sheet. This style allows the user to tab among the control windows of a child dialog box, use its accelerator keys, and so on.

DS_FIXEDSYS Use SYSTEM_FIXED_FONT instead of SYSTEM_FONT.

DS_LOCALEDIT Applies to 16-bit applications only. This style directs edit controls in the dialog box to allocate memory from the application's data segment. Otherwise, edit controls allocate storage from a global memory object.

DS_MODALFRAME Creates a dialog box with a modal dialog-box frame that can be combined with a title bar and window menu by specifying the WS_CAPTION and WS_SYSMENU styles.

DS_NOFAILCREATE Creates the dialog box even if errors occur _ for example, if a child window cannot be created or if the system cannot create a special data segment for an edit control.

DS_NOIDLEMSG Suppresses WM_ENTERIDLE messages that Windows would otherwise send to the owner of the dialog box while the dialog box is displayed.

DS_RECURSE Dialog box style for control-like dialog boxes.

DS_SETFONT Indicates that the dialog box template (the DLGTEMPLATE structure) contains two additional members specifying a font name and point size. The corresponding font is used to display text within the dialog box client area and within the dialog box controls. Windows passes the handle of the font to the dialog box and to each control by sending them the WM_SETFONT message.

DS_SETFOREGROUND Does not apply to 16-bit versions of Microsoft Windows. This style brings the dialog box to the foreground. Internally, Windows calls the SetForegroundWindow function for the dialog box.

DS_SYSMODAL Creates a system-modal dialog box. This style causes the dialog box to have the WS_EX_TOPMOST style, but otherwise has no effect on the dialog box or the behavior of other windows in the system when the dialog box is displayed.


Up-down control styles

UP-DOWN CONTROL STYLES

The following window styles are used with up-down controls:

UDS_ALIGNLEFT Positions the up-down control next to the left edge of the buddy window. The buddy window is moved to the right and its width decreased to accommodate the width of the up-down control.

UDS_ALIGNRIGHT Positions the up-down control next to the right edge of the buddy window. The width of the buddy window is decreased to accommodate the width of the up-down control.

UDS_ARROWKEYS Causes the up-down control to increment and decrement the position when the UP ARROW and DOWN ARROW keys are pressed.

UDS_AUTOBUDDY Automatically selects the previous window in the Z order as the up-down control's buddy window.

UDS_HORZ Causes the up-down control's arrows to point left and right instead of up and down.

UDS_NOTHOUSANDS Does not insert a thousands separator between every three decimal digits.

UDS_SETBUDDYINT Causes the up-down control to set the text of the buddy window (using the WM_SETTEXT message) when the position changes. The text consists of the position formatted as a decimal or hexadecimal string.

UDS_WRAP Causes the position to "wrap" if it is incremented or decremented beyond the ending or beginning of the range.


Register Resource Tuner now

Order Resource Tuner now!

We have made Resource Tuner available to you for free evaluation. You are entitled to evaluate the software for up to 30 days without obligation to pay. After 30 days, if you decide to keep the software, you must purchase the unlock code for Resource Tuner to turn your trial version into a full version and remove the 30 day usage limit.

Your evaluation copy of Resource Tuner is a full-featured release. This means that the same capabilities available in the registered software are present in the non-registered software. This allows you to try out all the features in Resource Tuner to confirm that they work to your satisfaction.

For Resource Tuner, we have two types of licenses: Personal and Business.

Personal License - may only be used by an individual not using the program for a business, academic, or government purpose. That is, you only intend to use it at home for private use. Your unlock code and license will be assigned to a private person.

Business License - the program will be used for professional use (such as in a business, academic, or government environment). The unlock code will be assigned to the organization name provided at the time of purchase and will reflect the total number of licenses purchased (Site License means the unlimited number of licenses).

Resource Tuner license pricing:
All the prices are quoted in US Dollars.
Single Personal License | $39.95
Single Business License | $59.95
5 Business Licenses Pack | $199.00
Business Site License | $999.00

ORDER ONLINE

PHONE, FAX AND MAIL ORDERS

INVOICES / PURCHASE ORDERS

LICENSE INFORMATION

UPGRADE POLICY

Ordering Resource Tuner is fast and easy. We accept all major credit cards, checks and money orders. Payments are accepted in either US dollars, Euros, or British Pounds. Switch and Solo debit card payments also accepted for UK orders.
Bank/Wire Transfer: To avoid fees on international bank transfers, we offer the option of transferring the order amount to an account in Germany, France, or the United Kingdom.

Registration entitles you:
fully functional, unrestricted copy of the software;
free lifetime technical support via e-mail;
minor updates to the software (See the Upgrade Policy).


Internet online registration

Order Resource Tuner online

We want to make buying as smooth and easy as possible for you. We use the latest in security so you can be sure your transaction is 100% safe. We do not store your credit card details at any stage, other than during the processing of your purchase.

After verifying your registration data and obtaining credit card approval, we will reply within 8 hours (usually 2-5 hours) with an e-mail containing your Product Key to unlock your evaluation version. If you use spam filtering software, please remember to add "@heaventools.com" to your list of acceptable e-mail senders.

We know that you want your software NOW, and we do care to provide instant service, but please note that the program is already fully functional (unless you are past the trial period already), and you don't have to wait to use the software.

All major credit cards are accepted
Service provided by element 5 and RegSoft.com

Via Share*It/element5 payments are accepted in either US dollars, Euros, British Pounds, Yen, Swiss Francs, or Canadian or Australian Dollars. Switch and Solo debit card payments also accepted for UK orders.

Product name | License type | Price, USD | Choose registration service
RESOURCE TUNER Version 1.95 for Windows 95/98/ME/NT/2000/XP | Personal License* | $39.95 | ShareIt! (Germany, Europe) (Europe, USA)
 |  |  | RegSoft.com (the United States) (USA)
 | Business License | $59.95 per 1 user | ShareIt! (Germany, Europe) (Europe, USA)
 |  |  | RegSoft.com (the United States) ( USA)
 | 5 Business Licenses Pack | $199.00 per 5 users | ShareIt! (Germany, Europe) (Europe, USA)
 | Business Site License | $999.00 per 50 users | ShareIt! (Germany, Europe) (Europe, USA)

* With Personal license, you can use the program for non-commercial purposes in non-business, non commercial environment. That is, you only intend to use it at home for private use. To use the program in a business, academic, or government environment, you should purchase a Business License.

Should you not wish to use Online Registration, all these above links also give you options to purchase via Phone, Fax, Purchase Order or Postal Mail.

To order Resource Tuner on CD-ROM in addition to download version add $9.95 and turn on the CD on Demand checkbox. Please allow 7 days for delivery to the US or Canada, or 10 days for international delivery. Note: regardless of whether you are ordering a CD or not, you will always get your license key by e-mail to unlock your evaluation version.

If you encounter any problem with the links above, please refer to [image] ResTuner Order Page for the most recent information on the actual order sites.

Important: Please note that we DO NOT accept online orders from free or anonymous e-mail addresses like yahoo.com, usa.net, hotmail.com etc. If that's the only address that you have, please let us know and we'll find a solution to this problem. Alternatively you can pay by check or mail order. We are sorry for the inconvenience. Thank you for your understanding.

If you don't receive your License Key within 24 hours, please e-mail to sales@heaventools.com as there is most likely a problem with your order, or we could not send your Product Key to your original e-mail address due to your Anti-SPAM system.


Ordering via voice, fax, or postal mail

PHONE, FAX, POSTAL MAIL, CHECK AND CASH ORDERS

If you are not yet on-line, you can still place your order with our customer service team by phone, fax or postal mail.

Fax Orders: Please fill in one of the standard order forms (Personal or Business) completely, print it out and fax it at one of the fax numbers listed below:

FAX: | In Europe: +49 (221) 310-8829
 | In USA: +1 (952) 646-4552
E-mail: | sales@element5.com
Snail Mail: | In Europe:
 | element 5 AG Vogelsanger Straße 78 50823 Cologne Germany
 | In USA:
 | element 5 9625 West 76th Street, Suite 150 Eden Prairie, MN 55344 USA Tel.: +1.952.646.5022 or +1.800.406.4966 Fax: +1.952.646.4552

Phone Orders:

US and Canadian customers: You may place your order by calling our order number (952) 646-5022 (available on weekdays from 9am to 5pm ).
Toll-free orders phone also available: 1-800-406-4966.

European customers: If you do not want to submit your order and credit card information online, you can call element5 Customer Service at +49-221-31088-20.

When you order by phone, please provide the ProductID 150941 (Personal License), 159885 (Business License), or 5 Business Licenses Pack (ID #520410) to the operator. This is the only way the order can be placed on the phone.

Please note that these numbers are for orders ONLY. Unfortunately, element5 Customer Service team cannot provide any technical assistance or technical information about Resource Tuner.

Visit our Web-based [image] Customer Care Center. The Customer Care Center offers FAQs, order data and information on contacting customer service.

Check and Cash Orders

We accept personal checks from our US customers. We also accept Canadian personal checks that are written on US Dollar accounts.
We request that customers outside of the USA and Canada send only guaranteed bank checks such as cashier's checks. You will receive detailed information by e-mail after your order is processed.
You can also send us cash by mail. You will receive notification of our postal address by e-mail after your order is submitted.
Your order will be shipped as soon as payment is received.

If you're located in the U.S., you can send your check or money order to element 5 USA office:

element 5
9625 West 76th Street, Suite 150
Eden Prairie, MN 55344
USA

Please make U.S. checks payable to "element 5 Inc."

Non-U.S. Customers: if you prefer to pay with cash or by check, please send payment to:

element 5 AG
Vogelsanger Straße 78
50823 Koeln
Germany

Please make checks payable to "element 5 AG" (Note: please do not send eurocheques in US$. We can only accept eurocheques in Euros.)

Visit our Web-based [image] Customer Care Center. The Customer Care Center offers FAQs, order data and information on contacting customer service.


Invoices / Purchase orders

Business customers can generally place a purchase order (PO) through our customer service. Private customers are not eligible for this type of order.

POs should be printed directly from your accounting system on company letterhead. This document is kept on file with us and we invoice the company with Net 30 payment terms. All POs must include the following information so that we can process your order:

  • The product name and the 6-digit product ID number:
    "Resource Tuner - Business License" #159885
    "Resource Tuner - 5 Business Licenses Pack" #520410

  • The number of units you wish to order

  • The name to which the product should be licensed

  • Your company's billing address

  • Contact name, phone number and fax number

  • The e-mail address for the order confirmation and invoice and, if different, the e-mail address for delivery

  • The currency you would like to order in: EUR USD GBP

If this information is complete, our customer service will be able to process your order without delay.

To send Purchase Order please use the following:

FAX: | In Europe: +49 (221) 310-8829
 | In USA: +1 (952) 646-4552
E-mail: | sales@element5.com
Addressl: | Customer service Europe (Languages: German/English/French/Italian/Spanish/Portuguese)
 | element 5 AG Vogelsanger Straße 78 50823 Cologne Germany Tel.: +49.221.31088.30 Fax: +49.221.31088.29
 | Customer service USA (Language: English)
 | element 5 9625 West 76th Street, Suite 150 Eden Prairie, MN 55344 USA Tel.: +1.952.646.5022 or +1.800.406.4966 Fax: +1.952.646.4552
Any purchase-related questions to element5:
 | Visit our Web-based [image] Customer Care Center. The Customer Care Center offers FAQs, order data and information on contacting customer service.


End User License Agreement

ELECTRONIC END USER LICENSE AGREEMENT FOR RESOURCE TUNER version 1.95

NOTICE TO USER: CAREFULLY READ THE FOLLOWING LEGAL AGREEMENT. BY INSTALLING THIS SOFTWARE YOU ACCEPT ALL THE TERMS AND CONDITIONS OF THIS AGREEMENT.

This Heaventools Software ("Heaventools") End User License Agreement accompanies the Heaventools Resource Tuner product and related explanatory materials ("SOFTWARE"). The term "SOFTWARE" also shall include any upgrades, modified versions or updates of the Software licensed to you by Heaventools. By installing and/or using the enclosed, attached, or about-to-be-installed software you are agreeing to be bound by the terms of this End User License Agreement. If you do not agree to the terms of this End User License Agreement, promptly stop the installation process, cease to use SOFTWARE, and erase this SOFTWARE and all of its associated files from your system.

1. LICENSE GRANT.

Heaventools Software grants you a license to use one copy of the version of this SOFTWARE on any one hardware product for as many licenses as you purchase. "You" means the individual not using the program for a business, academic, or government purpose, whose funds are used to pay the license fee. That is, you only intend to use it at home for private use. "Use" means storing, loading, installing, executing or displaying the SOFTWARE. If you install the SOFTWARE onto a multi-user platform or network, each and every individual user of the SOFTWARE must be licensed separately or be covered by a Business license. You may not modify the SOFTWARE or disable any licensing or control features of the SOFTWARE except as an intended part of the SOFTWARE's programming features. When you first obtain a copy of the SOFTWARE, you are granted an evaluation period of not more than 30 days, after which time you must pay for the SOFTWARE according to the terms and prices discussed in the SOFTWARE's documentation, or you must remove the SOFTWARE from your computer. This license is not transferable to any other hardware product or other company, entity, or individual. You are expected to use the SOFTWARE on your system and to thoroughly evaluate its usefulness and functionality before making a purchase. This "try before you buy" approach is the ultimate guarantee that the SOFTWARE will perform to your satisfaction. Any use of the SOFTWARE which is illegal under international or local law is forbidden by this licence. Any such action is the sole responsibility of the person committing the action.

2. OWNERSHIP.

The SOFTWARE is owned and copyrighted by Heaventools Software. Your license confers no title or ownership in the SOFTWARE and should not be construed as a sale of any right in the SOFTWARE.

3. COPYRIGHT.

The SOFTWARE is protected by United States copyright law and international treaty provisions. You acknowledge that no title to the intellectual property in the SOFTWARE is transferred to you. You further acknowledge that title and full ownership rights to the SOFTWARE will remain the exclusive property of Heaventools and you will not acquire any rights to the SOFTWARE except as expressly set forth in this license. You agree that any copies of the SOFTWARE will contain the same proprietary notices which appear on and in the SOFTWARE.

4. RESTRICTIONS.

You agree that you will not attempt to reverse compile, modify, adapt, translate, copy, emulate, clone, disassemble the SOFTWARE in whole or in part, or otherwise attempt to discover the source code of the SOFTWARE (except and solely to the extent an applicable statute expressly and specifically prohibits such restrictions). You may not sublicense, rent, lease, resell for profit or otherwise dispose of the SOFTWARE without our written permission. You may not grant a security interest in, or otherwise transfer rights to the SOFTWARE. You may not remove any proprietary notices or labels on the SOFTWARE.
Usage of the SOFTWARE may violate the copyright of the modified material. It is your responsibility to respect all legal aspects. You don't have the right to release to public any programs which were altered using the SOFTWARE, if not expressively granted by the respective authors.

5. DISCLAIMER OF WARRANTY.

THIS SOFTWARE AND THE ACCOMPANYING FILES ARE PROVIDED ON AN "AS IS" BASIS AND YOU ASSUME FULL RESPONSIBILITY FOR DETERMINING THE SUITABILITY OF THE PROGRAM AND FOR RESULTS OBTAINED. HEAVENTOOLS DISCLAIMS ALL WARRANTIES RELATING TO THIS SOFTWARE, WHETHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FREE OF DEFECTS, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT OF THIRD PARTY RIGHTS. NEITHER HEAVENTOOLS NOR ANYONE ELSE WHO HAS BEEN INVOLVED IN THE CREATION, PRODUCTION, OR DELIVERY OF THIS SOFTWARE SHALL BE LIABLE FOR ANY INDIRECT, CONSEQUENTIAL, SPECIAL, OR INCIDENTAL DAMAGES (INCLUDING, WITHOUT LIMITATIONS, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, DATA LOSS, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OR INABILITY TO USE SUCH SOFTWARE, EVEN IF HEAVENTOOLS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES OR CLAIMS. THE PERSON USING THE SOFTWARE BEARS ALL RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE. SHOULD THE SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU AND NOT HEAVENTOOLS OR ITS SUPPLIERS ASSUME THE ENTIRE COST OF ANY SERVICE AND REPAIR.

SOME JURISDICTIONS DO NOT ALLOW LIMITATION OR EXCLUSION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THE ABOVE LIMITATIONS OR EXCLUSION MAY NOT APPLY TO YOU TO THE EXTENT THAT LIABILITY IS BY LAW INCAPABLE OF EXCLUSION OR RESTRICTION.

IN NO EVENT SHALL ANY THEORY OF LIABILITY EXCEED THE LICENSE FEE PAID TO HEAVENTOOLS.

6. SEVERABILITY.

In the event of invalidity of any provision of this license, the parties agree that such invalidity shall not affect the validity of the remaining portions of this license.

7. NO LIABILITY FOR CONSEQUENTIAL DAMAGES.

IN NO EVENT SHALL HEAVENTOOLS OR ITS SUPPLIERS BE LIABLE TO YOU FOR ANY CONSEQUENTIAL, SPECIAL, INCIDENTAL OR INDIRECT DAMAGES OF ANY KIND ARISING OUT OF THE DELIVERY, PERFORMANCE OR USE OF THE SOFTWARE, EVEN IF HEAVENTOOLS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. IN NO EVENT WILL HEAVENTOOLS' LIABILITY FOR ANY CLAIM, WHETHER IN CONTRACT, TORT OR ANY OTHER THEORY OF LIABILITY, EXCEED THE LICENSE FEE PAID BY YOU, IF ANY. HEAVENTOOLS SHALL HAVE NO OBLIGATION TO YOU WITH RESPECT TO ANY CLAIM OF INFRINGEMENT BASED UPON YOUR USE OF THE SOFTWARE IN COMBINATION, OPERATION OR OTHERWISE WITH THE DATA OR MATERIALS NOT SUPPLIED BY HEAVENTOOLS.

8. TERMINATION.

This Agreement and the license granted hereunder will terminate automatically if you fail to comply with the limitations described herein. Upon termination, you must destroy all copies of the SOFTWARE and documentation.

9. ENTIRE AGREEMENT.

This is the entire agreement between you and Heaventools which supersedes any prior agreement or understanding, whether written or oral, relating to the subject matter of this license.

10. RESERVED RIGHTS.

All rights not expressly granted here are reserved to Heaventools and/or the respective authors (listed either in the documentation or within the SOFTWARE).

Heaventools reserves the right to make exceptions to any of these conditions, or alter these conditions, at any time. However, you may always use these conditions instead of any altered version if you prefer (note that this licence explicitly applies only to one version of the program; therefore, if Heaventools makes new conditions in connection with a future version, you do not then have the right to apply these conditions to that version instead).


Business License Agreement

ELECTRONIC BUSINESS LICENSE AGREEMENT FOR RESOURCE TUNER version 1.95

CAREFULLY READ THE FOLLOWING LEGAL AGREEMENT. BY USING, COPYING, TRANSMITTING, DISTRIBUTING OR INSTALLING THIS SOFTWARE YOU ACCEPT ALL THE TERMS AND CONDITIONS OF THIS BLA ("BUSINESS LICENSE AGREEMENT").

This license does not cover the use of the SOFTWARE during an evaluation period. If you are using the SOFTWARE for evaluation purposes, the standard End User License Agreement applies.

This Heaventools Software ("Heaventools") Business License Agreement accompanies the Heaventools Resource Tuner product and related explanatory materials ("SOFTWARE"). The term "SOFTWARE" also shall include any upgrades, modified versions or updates of the Software licensed to you by Heaventools. By installing and/or using the enclosed, attached, or about-to-be-installed software you are agreeing to be bound by the terms of this Business License Agreement. If you do not agree to the terms of this Business License Agreement, then do not use, copy, transmit, distribute, or install the Software.

1. LICENSE GRANT.

Subject to the terms below, you are hereby licensed by Heaventools to use the SOFTWARE on computers or workstations, in a business, academic, or government environment, provided a Business License has been purchased and all fees have been paid to Heaventools. "You" means the company, entity or individual, whose funds are used to pay the license fee. "Use" means storing, loading, installing, executing or displaying the SOFTWARE.

You may, without violating the License Agreement for the SOFTWARE:

a) Install the SOFTWARE on a per user or per seat basis, whichever is less, limited to the number of seats purchased.

b) Transfer the SOFTWARE from one user to another, or one computer to another, by means of uninstalling and subsequently reinstalling the software.

c) Install the SOFTWARE for a single person who uses the software personally on one or more computers, or on a single workstation used non-simultaneously by multiple people, but not both. You may access the SOFTWARE through a network, provided that you have obtained enough licenses to cover the total number of workstations that will be used to run the software through the network. For example, if the SOFTWARE will be used on five workstations, then you must purchase five or more licenses (and not three), even if only a maximum of three of those workstations will run the SOFTWARE at any one time.

d) Give exact copies of this version of the SOFTWARE personally to anyone within the company or organization.

e) Distribute exact copies of this version of the SOFTWARE, if done exclusively through electronic channels;

f) Make as many exact copies of this version of the SOFTWARE as you wish, for purposes of distribution as described in (a), (b), (c), (d) and (e) above.

You are specifically prohibited from charging, or requesting donations, for any copies, however made, and from distributing such copies with other products of any kind, commercial or otherwise, without prior written permission from Heaventools. Heaventools reserves the right to revoke the above distribution rights at any time, for any or no reason.

2. OWNERSHIP.

The SOFTWARE is owned and copyrighted by Heaventools Software. Your license confers no title or ownership in the SOFTWARE and should not be construed as a sale of any right in the SOFTWARE.

3. COPYRIGHT.

The SOFTWARE is protected by United States copyright law and international treaty provisions. You acknowledge that no title to the intellectual property in the SOFTWARE is transferred to you. You further acknowledge that title and full ownership rights to the SOFTWARE will remain the exclusive property of Heaventools and you will not acquire any rights to the SOFTWARE except as expressly set forth in this license. You agree that any copies of the SOFTWARE will contain the same proprietary notices which appear on and in the SOFTWARE.

4. RESTRICTIONS.

All rights of any kind in the SOFTWARE which are not expressly granted in this License Agreement are entirely and exclusively reserved to and by Heaventools. You agree that you will not attempt to reverse compile, modify, adapt, translate, copy, emulate, clone, disassemble, or create derivative works based on, the SOFTWARE in whole or in part, or otherwise attempt to discover the source code of the SOFTWARE (except and solely to the extent an applicable statute expressly and specifically prohibits such restrictions). You may not sublicense, rent, lease, resell for profit or otherwise dispose of the SOFTWARE without our written permission. You may not make access to the SOFTWARE available to others in connection with a service bureau, application service provider, or similar business. You may not grant a security interest in, or otherwise transfer rights to the SOFTWARE. You may not remove any proprietary notices or labels on the SOFTWARE.

5. DISCLAIMER OF WARRANTY.

THIS SOFTWARE AND THE ACCOMPANYING FILES ARE PROVIDED ON AN "AS IS" BASIS AND YOU ASSUME FULL RESPONSIBILITY FOR DETERMINING THE SUITABILITY OF THE PROGRAM AND FOR RESULTS OBTAINED. HEAVENTOOLS DISCLAIMS ALL WARRANTIES RELATING TO THIS SOFTWARE, WHETHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FREE OF DEFECTS, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT OF THIRD PARTY RIGHTS. NEITHER HEAVENTOOLS NOR ANYONE ELSE WHO HAS BEEN INVOLVED IN THE CREATION, PRODUCTION, OR DELIVERY OF THIS SOFTWARE SHALL BE LIABLE FOR ANY INDIRECT, CONSEQUENTIAL, SPECIAL, OR INCIDENTAL DAMAGES (INCLUDING, WITHOUT LIMITATIONS, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, DATA LOSS, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OR INABILITY TO USE SUCH SOFTWARE, EVEN IF HEAVENTOOLS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES OR CLAIMS. THE PERSON USING THE SOFTWARE BEARS ALL RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE. SHOULD THE SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU AND NOT HEAVENTOOLS OR ITS SUPPLIERS ASSUME THE ENTIRE COST OF ANY SERVICE AND REPAIR.

SOME JURISDICTIONS DO NOT ALLOW LIMITATION OR EXCLUSION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THE ABOVE LIMITATIONS OR EXCLUSION MAY NOT APPLY TO YOU TO THE EXTENT THAT LIABILITY IS BY LAW INCAPABLE OF EXCLUSION OR RESTRICTION.

IN NO EVENT SHALL ANY THEORY OF LIABILITY EXCEED THE LICENSE FEE PAID TO HEAVENTOOLS.

6. SEVERABILITY.

In the event of invalidity of any provision of this license, the parties agree that such invalidity shall not affect the validity of the remaining portions of this license.

7. NO LIABILITY FOR CONSEQUENTIAL DAMAGES.

IN NO EVENT SHALL HEAVENTOOLS OR ITS SUPPLIERS BE LIABLE TO YOU FOR ANY CONSEQUENTIAL, SPECIAL, INCIDENTAL OR INDIRECT DAMAGES OF ANY KIND ARISING OUT OF THE DELIVERY, PERFORMANCE OR USE OF THE SOFTWARE, EVEN IF HEAVENTOOLS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. IN NO EVENT WILL HEAVENTOOLS' LIABILITY FOR ANY CLAIM, WHETHER IN CONTRACT, TORT OR ANY OTHER THEORY OF LIABILITY, EXCEED THE LICENSE FEE PAID BY YOU, IF ANY. HEAVENTOOLS SHALL HAVE NO OBLIGATION TO YOU WITH RESPECT TO ANY CLAIM OF INFRINGEMENT BASED UPON YOUR USE OF THE SOFTWARE IN COMBINATION, OPERATION OR OTHERWISE WITH THE DATA OR MATERIALS NOT SUPPLIED BY HEAVENTOOLS.

8. TERMINATION.

This Agreement and the license granted hereunder will terminate automatically if you fail to comply with the limitations described herein. Upon termination, you must destroy all copies of the SOFTWARE and documentation.

9. ENTIRE AGREEMENT.

This is the entire agreement between you and Heaventools which supersedes any prior agreement or understanding, whether written or oral, relating to the subject matter of this license.

10. RESERVED RIGHTS.

All rights not expressly granted here are reserved to Heaventools and/or the respective authors (listed either in the documentation or within the SOFTWARE).

Heaventools reserves the right to make exceptions to any of these conditions, or alter these conditions, at any time. However, you may always use these conditions instead of any altered version if you prefer (note that this licence explicitly applies only to one version of the program; therefore, if Heaventools makes new conditions in connection with a future version, you do not then have the right to apply these conditions to that version instead).


Upgrade policy

ORDER ONLINE

PHONE, FAX AND MAIL ORDERS

INVOICES / PURCHASE ORDERS

LICENSE INFORMATION

UPGRADE POLICY

We are constantly improving Resource Tuner. One part of this improvement is to add new features to the software and to improve existing features significantly. The second - not less important - part is fixing bugs in the current release.

We at Heaventools commit ourselves to provide you with the best possible product. Therefore we will provide you with bug fixing and minor feature improvement releases (updates) for your licensed copy of Resource Tuner free of charge. For releases with major improvements (upgrades) registered users will have the possibility of purchasing licenses for lowered license fees. Registration may also entitle you to discounts on new software releases from Heaventools.

To make sure that nobody will have to worry about having to spend money upgrading only one or two months after purchasing Resource Tuner, all customers who have bought v.1.xx licenses after February 19th, 2003 are entitled to free upgrades to Resource Tuner version 2.00 when it is released.

Order now! Your license will be valid for all future versions 2.xx of the product. You will never be charged for minor updates!


Heaventools Developments

Our Developments

For up-to-date information on Resource Tuner and other products from Heaventools Software please point your browser to the [image] Heaventools news page.

RESOURCE TUNER CONSOLE

Resource Tuner Console is a stand-alone command-line application for Windows, designed to automatically edit resources in large numbers of executable files. Resource Tuner Console accepts input from a file, and supports VBScript.

If you need to update existing resources, delete, or add new ones for several hundred files, you are more than likely going to want some way to implement this with a batch file. Whenever large numbers of files have to be processed or to be accessible through scripting / batching, you need Resource Tuner Console.

Resource Tuner Console fully supports Unicode. It allows you to edit strings in and work in multiple languages. No more struggling with OEM/ANSI code pages! Make your applications and data operable and accessible in different languages!

More on Resource Tuner Console: http://www.heaventools.com

PE EXPLORER

PE Explorer is a file editor, win32 disassembler, and binary header analysis tool for Delphi developers who wish to examine the inner workings of Windows executable files. It offers a thorough look at PE file structure and all of the resources in the file, and allows you to examine just about every aspect of a PE (Portable Executable) file such as .EXE, .DLL, Device Drivers (.SYS), OCX Controls, and Borland Libraries (.dpl & .bpl). Once inside, file structure can be analyzed, problems diagnosed, changes made and resources repaired.

PE Explorer comes with a Visual Resource Editor, PE Header Viewer, Exported/Imported API Function Viewer, API Function Syntax Lookup, Dependency Scanner and Easy Disassembler. Because PE Explorer has itself been written using Borland® Delphi, there's a very strong emphasis on peeking inside Delphi applications and packages.

The product also allows you to edit the properties of controls on Delphi forms within the PE file, and remove both debugging information and the base relocation table from an executable, as well as view and edit the various section headers (.text, .data, etc). Other features include automatic UPX unpacking, adding of Windows XP control styles to older applications, support for custom plug-ins and more.

More on PE Explorer: http://www.heaventools.com


How to order

How to order Resource Tuner

PRICING AND ORDERING METHODS

For pricing, ordering and payment methods, please see the Order Resource Tuner section of the Resource Tuner help.

Order Resource Tuner on-line: This is the fastest and easiest way to order Resource Tuner. Your credit card information is sent directly to the credit card processor in a highly secure manner.

Once we have received your payment, the license key will be sent out to you by e-mail. Because the software can be downloaded from the Internet, no disk media will be mailed. To order Resource Tuner on CD-ROM in addition to download version add $9.95 and turn on the CD on Demand checkbox. Please allow 7 days for delivery to the US or Canada, or 10 days for international delivery.

Note: regardless of whether you are ordering a CD or not, you will always get your license key by e-mail to unlock your evaluation version.

For information on quantity pricing and reseller quotes, please send an e-mail message to: sales@heaventools.com

To ensure that you find answers to questions about the order and payment process or special transactions even more quickly, we recommend a visit to our Web-based [image] Customer Care Center. The Customer Care Center offers FAQs, order data and information on contacting customer service.


Credits

Resource Tuner is copyright © 2001-2005 by Heaventools Software. All rights reserved.
Resource Tuner and Heaventools Logo are trademarks of Heaventools Software. The names of actual companies and products mentioned herein may be the trademarks of their respective owners and are used for identification purposes only.

Resource Tuner is a stand-alone version of the resource editor component of PE Explorer™, another Heaventools product. Please visit our home page http://www.heaventools.com for more info on our products.

We are proud to be a Borland Technology Partner


Control classes and styles

CONTROL CLASSES AND STYLES

CONTROL CLASSES

WINDOW STYLES

WINDOW EXTENDED STYLES

BUTTON STYLES

COMBO BOX STYLES

EDIT CONTROL STYLES

LIST BOX CONTROL STYLES

SCROLL BAR STYLES

STATIC CONTROL STYLES

DIALOG BOX STYLES


//-----------------------------------------------------------------------------
// Resource Tuner Demo Plug-In
// (c)2001 by Yuri Rai/Heaventools ltd.
// http://www.heaventools.com
//
// Pascal (Delphi):  t12dll.dpr
//-----------------------------------------------------------------------------

library t12dll;

uses
 Windows,
 Messages;

{$R *.RES}

const
 IName = 'Resource Tuner Demo PlugIn';

//-----------------------------------------------------------------------------
// Prototype of function which allocates memory.
//
// Used only to return results to Resource Tuner.
// All other memory allocation should use standard library calls.
//
// Rather than being permanently loaded into memory, the plug-in uses this
// function at run-time, to request a buffer of the necessary size from
// ResTuner where the plug-in can store the results of an operation. The
// plug-in does not need to clear the input buffer, or de-allocate the space
// after use, as these tasks are performed by Resource Tuner.
//
// Input : Size - DWORD
//              - Size of requested memory
// OutPut: Pointer
//              - The pointer to allocated memory. In case of failure
//                when allocating memory returns nil.
 type
 PMemoryAllocator = ^TMemoryAllocator;
 TMemoryAllocator = function (Size: DWORD): Pointer; stdcall;

//-----------------------------------------------------------------------------
// CallBack Events
const
 evID_PostLogInfo = 0;

// The prototype of the function, used by Plug-in to inform Resource Tuner of various
//events that have occurred at run time.
//
// IMPORTANT: Currently, only 'Post data to log' is supported.
//            For compatibility with future versions of Resource Tuner, use
//            ONLY PREDEFINED EVENT TYPES.
//
// Input : None
// Output: dwPGIID   - DWORD
//              - Interface ID. It is used to uniquely specify a particular event
//                issued by the plug-in if several functions are executing at
//                the same time.
//
//                IMPORTANT: Only the Interface ID values received from Resource Tuner
//                           should be used.
//
//         dwEventID - DWORD
//              - Identifier of the occurred event.
//
//         pcMessage - Pointer
//              - Pointer to the data that is necessary to transmit to Resource Tuner.
//
type
 PPGICallBack = ^TPGICallBack;
 TPGICallBack = procedure (dwPGIID: DWORD; dwEventID: DWORD; pcMessage: PChar); stdcall;

//--------------------------------------------------------------------------------------
// The structure by which interaction with Resource Tuner is achieved.
// ATTENTION! Under no circumstances should you modify the values marked as
//            Read Only! Changing these values may adversely affect the operation
//            of the program.
type
 PPGIParamsBlock = ^TPGIParamsBlock;
 TPGIParamsBlock = record
  pMemAllocator       : PMemoryAllocator; // The address of the procedure
                                          // allocating memory. The procedure
                                          // is required for de-allocating
                                          // memory correctly after use.
  pCallBack           : Pointer;          // Pointer to CallBack function.
  pInBuff             : Pointer;          // Pointer to input buffer.
  pOutBuff            : Pointer;          // Pointer to output buffer.
                                          // Filled by plug-in if execution of
                                          // the function was successful.

  dwInSize            : DWORD;            // Size of input buffer.
  dwOutSize           : DWORD;            // Size of output buffer.
                                          // Filled by plug-in if execution of
                                          // the function was successful.
  dwInterface         : DWORD;            // Interface ID. Read Only!
  dwIndex             : DWORD;            // Index. (For internal use by ResTuner).
                                          // Read Only!
 end;

//-----------------------------------------------------------------------------
// The function executed prior to beginning data processing by Resource Tuner.
// This function provides a generic means to perform any startup processing.
// In the body of this function it is possible, for example, to place the code
// to unpack any packed files, and transmit them to Resource Tuner for further
// processing.
//
// Input:  - the function receives PPGIParamsBlock and uses values sent to it.
// Output: - returns True if execution was successful, otherwise it returns
//           False.
//
function PexPreloadImage(pPGIPB: PPGIParamsBlock): Boolean; stdcall;
const
 DemoMessage1 = 'Emulating Execution...';
 DemoMessage2 = 'Allocating memory ...';
 DemoMessage3 = 'Copy InBuff to OutBuff...';
 DemoMessage4 = 'Runtime error: PexPreloadImage';

var MA : TMemoryAllocator;
    CB : TPGICallBack;
begin
 // We have to return True if success and False in all
 // other cases (error occurred, haven't found data we can work with).
 Result := False;
 // Getting pointer to CallBack function
 @CB := pPGIPB.pCallBack;
 // Getting pointer to function that allocates memory
 @MA := pPGIPB.pMemAllocator;

 // Emulating execution of the function
 try
  // Posting an event to the log.
  if (@CB <> nil) then
     CB(pPGIPB.dwInterface, evID_PostLogInfo, PChar(DemoMessage1));

  // Place your code here. For example, we will move input buffer to
  // output buffer.
  //
  //***************************************************************************
  // Posting an event to the log.
  if (@CB <> nil) then
     CB(pPGIPB.dwInterface, evID_PostLogInfo, PChar(DemoMessage2));

  // Asking Resource Tuner for allocating memory, and filling out the required
  //fields in the structure.
  pPGIPB.pOutBuff  := MA(pPGIPB.dwInSize);
  pPGIPB.dwOutSize := pPGIPB.dwInSize;

  // Moving data from one buffer to another.
  System.Move(pPGIPB.pInBuff^, pPGIPB.pOutBuff^, pPGIPB.dwInSize);

  // Posting an event to the log.
  if (@CB <> nil) then
     CB(pPGIPB.dwInterface, evID_PostLogInfo, PChar(DemoMessage3));

  // Everything is OK
  Result := True;
  //***************************************************************************
  //
 except
  // An error occurred while executing. Posting an event to the log.
  if (@CB <> nil) then
     CB(pPGIPB.dwInterface, evID_PostLogInfo, PChar(DemoMessage4));
 end;
end;

//---------------------------------------------------------------------------
// Optional procedure.
//
// If this procedure is present, Resource Tuner adds an entry titled "Plug-ins -
// About <Name>"  to the menu.  The name is obtained by Resource Tuner when the
// plug-in is registered.  This menu options allows infomormation about the
// plug-in to be displayed to the user.
//
procedure PexAboutPlugIn; Export; StdCall;
var S : String;
begin
 // Place your code that displays 'About' info here.
 // We are just showing MessageBox.
//***************************************************************************
 S := IName + '.' + #$0D#$0A +'Version 1.0';
 Windows.MessageBox(0, PChar(S), PChar('About'), MB_OK or MB_ICONINFORMATION);
end;

//---------------------------------------------------------------------------
// The procedure called at Plug-in registration.
//
//  This should return to Resource Tuner a pointer to the line, which contains the
//  plug-in name. Resource Tuner uses this to associate the plug-in with any menu
//  items and events it provides.
//
//  IMPORTANT: The line should not be empty. The plug-in will not be registered
//             if an empty line is given.
//
procedure PexRegisterPlugIn(var N: PChar); Export; StdCall;
begin
 N := PChar(IName);
end;

//---------------------------------------------------------------------------
exports
  PexRegisterPlugIn   index 1,
  PexAboutPlugIn      index 2,
  PexPreloadImage     index 3;
//---------------------------------------------------------------------------

begin
end.


//-----------------------------------------------------------------------------
// PE Explorer/Resource Tuner Demo Plug-In
// (c)2001 by Yuri Rai & Mike Caetano/Heaventools ltd.
// http://www.heaventools.com
//
// C++
//-----------------------------------------------------------------------------

#include <windows.h>

#include "globals.h"

// ---------------------------------------------------------------------------
// ResTuner MEMORY ALLOCATOR FUNCTION POINTER TYPEDEF
typedef	void * __stdcall (*pfnMemoryAllocator)(DWORD);

// ---------------------------------------------------------------------------
// ResTuner CALLBACK FUNCTION FUNCTION POINTER TYPEDEF
typedef	void __stdcall (*pfnPGICallBack)(DWORD, DWORD, LPCTSTR);

// ---------------------------------------------------------------------------
// ResTuner PLUGIN INTERFACE STRUCTURE
typedef struct tagPGIParamsBlock
{
    pfnMemoryAllocator pMemAllocator; // function pointer to ResTuner supplied
                                      // memory allocation
    pfnPGICallBack pCallBack;         // function pointer to ResTuner callback
                                      // function
    LPVOID pInBuff;                   // pointer to input buffer
    LPVOID pOutBuff;                  // pointer to output buffer filled by plugin
    DWORD dwInSize;                   // size in bytes of input buffer
    DWORD dwOutSize;                  // size in bytes of output buffer set by plugin
    DWORD dwInterface;                // read only interface ID
    DWORD dwIndex;                    // read only plugin index
}
PGIParamsBlock, *PPGIParamsBlock;

// ---------------------------------------------------------------------------
// GLOBAL VARIABLES

LPCTSTR szPluginName = SZPLUGINNAME;

DWORD   evID_PostLogInfo = 0;

// ---------------------------------------------------------------------------
// EXPORT FUNCTION PROTOTYPES
void __stdcall PexRegisterPlugIn(LPCTSTR *);
void __stdcall PexAboutPlugIn(void);
BOOL __stdcall PexPreloadImage(PPGIParamsBlock);

// ---------------------------------------------------------------------------
// EXPORT FUNCTION IMPLEMENTATIONS

// ---------------------------------------------------------------------------
// ResTuner R E G I S T E R P L U G I N

void __stdcall __declspec(dllexport) PexRegisterPlugIn(LPCTSTR *ppPluginName)
{
    *ppPluginName = szPluginName;
}

// ---------------------------------------------------------------------------
// ResTuner A B O U T P L U G I N

void __stdcall __declspec(dllexport) PexAboutPlugIn(void)
{
    TCHAR szBuffer[MAX_PATH];
    ZeroMemory(szBuffer,MAX_PATH);
    wsprintf(szBuffer, TEXT("%s\r\n%s"), szPluginName, SZVERSION);
    MessageBox(NULL, szBuffer, TEXT("About"), MB_OK|MB_ICONINFORMATION);
}

// ---------------------------------------------------------------------------
// ResTuner(P E X) P R E L O A D I M A G E

BOOL __stdcall __declspec(dllexport) PexPreloadImage(PPGIParamsBlock pPGIPB)
{

    // assume the worst :-)
    BOOL result = FALSE;

    // setup messages for ResTuner log window
    LPCTSTR DemoMessage1 = "Emulating Execution...";
    LPCTSTR DemoMessage2 = "Allocating memory ...";
    LPCTSTR DemoMessage3 = "Copy InBuff to OutBuff...";
    LPCTSTR DemoMessage4 = "Runtime error: PexPreloadImage";

    // assign function pointers to local variables
    pfnMemoryAllocator MA = pPGIPB->pMemAllocator;
    pfnPGICallBack CB = pPGIPB->pCallBack;

    __try
    {

        // announce plugin invocation
        if ( CB != NULL ) {
            CB(pPGIPB->dwInterface, evID_PostLogInfo, DemoMessage1);
        }

        // announce action preparation
        if ( CB != NULL ) {
             CB(pPGIPB->dwInterface, evID_PostLogInfo, DemoMessage2);
        }

        // set output buffer size parameter
          pPGIPB->dwOutSize = pPGIPB->dwInSize;

        // let ResTuner allocate shared memory for output buffer
        pPGIPB->pOutBuff = MA(pPGIPB->dwInSize);

        // transfer contents to output buffer
        CopyMemory(pPGIPB->pOutBuff, pPGIPB->pInBuff, pPGIPB->dwInSize);

        // announce action success
        if ( CB != NULL ) {
             CB(pPGIPB->dwInterface, evID_PostLogInfo, DemoMessage3);
        }

        // all systems go!
        result = TRUE;

    }
    __except ( EXCEPTION_EXECUTE_HANDLER )
    {

        // announce error
        if ( CB != NULL ) {
             CB(pPGIPB->dwInterface, evID_PostLogInfo, DemoMessage4);
         }

    }

    // return status
    return(result);

}

// ---------------------------------------------------------------------------


Resource Tuner Personal License Order Form

Please print it out and fax it at one of the fax numbers listed below
In Europe: +49 (221) 310-8829
In USA: +1 (724) 850-8187

Product: Resource Tuner - Personal License (#150941)

Program-ID : 150941

Price per unit: USD 39.95

Quantity (Units): ___________________________________

Billing address

Last Name: __________________________________________________

First Name: _________________________________________________

Company: ___________________________________________________

VAT ID No. (if applicable) _______________________________________

Address: ____________________________________________________

Postal Code and City: __________________________________________

State / Province: ________________________________

Country: _______________________________________

Phone: _______________________________________

Fax: _________________________________________

E-Mail: _______________________________________

License to: My name

Payment Options

How would you like to pay the registration fee:

credit card - debit card - wire transfer - check - cash

Choose Currency: EUR USD GBP

Credit Card Information (if applicable)

Credit Cards: Visa - Eurocard/Mastercard - American Express - Diners Club - JCB
Debit Cards: Switch - Solo

Card Holder: ________________________________

Card No.: ___________________________________

Expiration Date: ________

Start date (only Switch/Solo) ___________________

Issue number (only Switch/Solo) ________________

Date / Signature: ___________________________


Resource Tuner Business License Order Form

Please print it out and fax it at one of the fax numbers listed below
In Europe: +49 (221) 310-8829
In USA: +1 (724) 850-8187

Choose Product:

Resource Tuner - Business License (ID #159885) Price: USD 59.95

Resource Tuner - 5 Business Licenses Pack (ID #520410) Price: USD 199.00

Resource Tuner - Business Site License (ID #520411) Price: USD 999.00

Quantity (Units): ___________________________________

Billing address

Last Name: __________________________________________________

First Name: _________________________________________________

Company: ___________________________________________________

VAT ID No. (if applicable) _______________________________________

Address: ____________________________________________________

Postal Code and City: __________________________________________

State / Province: ________________________________

Country: _______________________________________

Phone: _______________________________________

Fax: _________________________________________

E-Mail: _______________________________________

License to: My name Company

Payment Options

How would you like to pay the registration fee:

credit card - debit card - wire transfer - check - cash

Choose Currency: EUR USD GBP

Credit Card Information (if applicable)

Credit Cards: Visa - Eurocard/Mastercard - American Express - Diners Club - JCB
Debit Cards: Switch - Solo

Card Holder: ________________________________

Card No.: ___________________________________

Expiration Date: ________

Start date (only Switch/Solo) ___________________

Issue number (only Switch/Solo) ________________

Date / Signature: ___________________________


Ordering a personal license via voice, fax, or postal mail

Please print out the following form, and fax or mail it to:

ShareIt!
element 5 AG
Vogelsanger Str. 78
50823 Cologne
Germany

Phone: +49-221-31088-20
Fax: +49-221-31088-29
E-Mail: service@shareit.com

US and Canadian customers may also order by calling toll-free 1-800-903-4152.

When you order by phone, please provide the Program-ID 150941 to the operator. This is the only way the order can be placed on the phone.

This hotline is only for ordering. Unfortunately, we cannot provide any technical assistance or technical information about the program. You must contact the programmer directly for technical support at: support@restuner.com
US check and cash orders can be sent to our US office at:

ShareIt! Inc.
P.O. Box 844
Greensburg, PA 15601, USA
Phone: (724) 850 - 8186
Fax: (724) 850 - 8187

*** ALL CHECKS SENT TO THE U.S. OFFICE MUST BE MADE PAYABLE TO: "ShareIt! Inc." ***

Registration Form for Resource Tuner

Program-ID : 150941

Price: US$34.95

Quantity (Units): ___________________________________

Last Name:
__________________________________________________

First Name:
__________________________________________________

Company:
__________________________________________________

VAI-ID-No. (if applicable)
__________________________________________________

Address:
__________________________________________________

Postal Code and City:
___________________________________________________

Country:
___________________________________________________

Phone:
___________________________________________________

Fax:
___________________________________________________

E-Mail:
___________________________________________________

How would you like to pay the registration fee:

credit card - wire transfer - check - cash

Credit Card Information (if applicable)

Credit Cards: Visa - Eurocard/Mastercard - American Express - Diners Club

Card Holder: _________________________________________

Card No.: ____________________________________________

Expiration Date: _____________________________

Date / Signature: ______________________________________